Displaying Parameter in Graph Builder

Hi
I am passing parameter to graphic builder. How i caA display this parameter at run time. Trying to create text item seems creating something like a label not a text filed to which i want to set the value= p_parameter1
Thanks

Asim
in your select statement you can check if the employee has not its picture or picture field is null then return logo. for this you have to assign some default value to the field Like 'N' is default value for picture field so when there is not picture or field is null then 'N' will be its default value and you can check in your query like
SELECT DECODE(pict, 'N',Logo,pict)                    FROM emp

Similar Messages

  • Passing parameter to Graph Builder

    Hi
    If somebody has experience with Graph Builder- how i can show(at run time) the value of parameter wich i am passing to my chart item in Graph Builder?
    I am trying to assign a value to a text item in my Display(in Graph Builder).
    In Open trigger i am using :text_item1 := :param1
    and i got error bad bind variable"Text_item1"
    How i have to refer to e text item in Graph Builder?
    And also - how i can create a chart wich query is based on stored procedure?
    Thanks

    Hi Galia,
    Assuming you are working with Forms 6 or above, you have to create a block with a display_item object.
    Using the button on Layout Editor you will be prompted for going with Graphics Wizard or manual building.
    If your grapho is not so complex, I think the first one it's the best way to include a grapho inside a block of your form...
    Opening/displaying/updating your grapho will be automatic (but you can set differently few properties of this item too).
    Refer to Forms Help for improving your graphics, even I think they are not Forms' best feature...especially on web envinronment.
    Hope this will help you,
    Marco

  • Memory problem with loading a csv file and displaying 2 xy graphs

    Hi there, i'm having some memory issues with this little program.
    What i'm trying to do is reading a .csv file of 215 mb (6 million lines more or less), extracting the x-y values as 1d array and displaying them in 2 xy graphs (vi attacked).
    I've noticed that this process eats from 1.6 to 2 gb of ram and the 2 x-y graphs, as soon as they are loaded (2 minutes more or less) are really realy slow to move with the scrollbar.
    My question is: Is there a way for use less memory resources and make the graphs move smoother ?
    Thanks in advance,
    Ierman Gert
    Attachments:
    read from file test.vi ‏106 KB

    Hi lerman,
    how many datapoints do you need to handle? How many do you display on the graphs?
    Some notes:
    - Each graph has its own data buffer. So all data wired to the graph will be buffered again in memory. When wiring a (big) 1d array to the graph a copy will be made in memory. And you mentioned 2 graphs...
    - load the array in parts: read a number of lines, parse them to arrays as before (maybe using "spreadsheet string to array"?), finally append the parts to build the big array (may lead to memory problems too).
    - avoid datacopies when handling big arrays. You can show buffer creation using menu->tools->advanced->show buffer allocation
    - use SGL instead of DBL when possible...
    Message Edited by GerdW on 05-12-2009 10:02 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to display on the graph three or more waveforms where time scale is not an index of array but a real time

    How to display on the graph three or more waveforms where time scale is not an index of array but a real time:
    I measure three voltages Va, Vb, and Vc on my Test stands every 3sec. So I’m building four arrays (Va, Vb, Vc, Time) and combine all in one.
    Time
    Va
    Vb
    Vc
    0
    5
    3.5
    2.8
    3
    4.9
    3.6
    2.9
    6
    4.8
    3.8
    2.1
    Now I need to show on the graph in which scale X is “Voltage” and scale Y is “Time”.
    How can I do it?
    Thanks a lot,
    Boris

    Hi, thanks all your reply.
    You may find "points_to_bar_graph.vi" from this website, I find it by this way.
    I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
    So here I just paste it into word document.
    Attachments:
    question.doc ‏520 KB
    points_to_bar_graph.vi ‏62 KB

  • REP-0546 when displaying parameter form

    Hi,
    here is my issue:
    when i run the report from forms with paramform=no the report works fine and produces valid output.
    However when parameter paramform=yes the parameter form window comes up with error:
    REP-0546: The parameter value is invalid
    I am puzzled.
    Any suggestions?

    Hello,
    Reports are 11g, there are no before or after trigger. However there is validation trigger on the parameter. I am running the report from Oracle Forms 11g
    Here is a code snippet:
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_FILENAME);
    hidden_action := hidden_action ||'&destype='||GET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_DESTYPE);
    hidden_action := hidden_action ||'&desformat='||GET_REPORT_OBJECT_PROPERTY (p_report_id,REPORT_DESFORMAT);
    -- hidden_action := hidden_action ||'&desname='||GET_REPORT_OBJECT_PROPERTY (p_report_id,REPORT_DESNAME);
    -- hidden_action := hidden_action ||'&copies=1';
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'
    ||get_application_property(password)||'@'||
    get_application_property(connect_string);
    c_old :='@';
    -- replace spaces with & sign for html page parameters format
    FOR i IN 1..LENGTH(p_report_otherparam) LOOP
    c_new:= substr(p_report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    -- hidden_action := hidden_action ||'&'||v_report_other;
    -- hidden_action := v_report_servlet||'?_hidden_server='||v_report_server||hidden_action;
    -- message('hidden_action = '||hidden_action);
    --message(' ');
    -- Build the string of user parameters dynamically
    -- if parameter list exists build string of parameters dynamically
    if NOT id_null(p_param_list) then
    begin
    FOR idx IN c_rep_params (GET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_FILENAME)) LOOP
    if (idx.parameter_type = 'USER') then
         GET_PARAMETER_ATTR(p_param_list,idx.parameter_name,v_paramtype,v_value);
    if (v_other_params is NULL) then
    v_other_params := '&'||lower(idx.parameter_name)||'='||v_value;
    else
         v_other_params := v_other_params||'&'||lower(idx.parameter_name)||'='||v_value;
    end if;
    end if;
    END LOOP;
    -- message('parameters for the report: '||v_other_params);
    end;
    end if;
    message('Other params: '||v_other_params);
    hidden_action := hidden_action ||'&'||p_report_otherparam||v_other_params;
    hidden_action := v_report_servlet||'?_hidden_server='||v_report_server||hidden_action;
    -- SET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_OTHER,'pfaction='||hidden_action||v_other_params);
    --v_string1 := 'http://wdpra99a0227.wellsfargo.com:9003/reports/rwservlet?SERVER=rep_wls_reports_wdpra99a0227_asinst_1&destype=cache&desformat=pdf&userid=fur/devgang@oadev&report=cprofall.rdf&pf_assignment=CN132';
    -- SET_REPORT_OBJECT_PROPERTY(p_report_id, REPORT_OTHER,'pfaction='||v_string1||' PARAMFORM=YES');
    SET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_OTHER,'pfaction='||hidden_action);
    -- SET_REPORT_OBJECT_PROPERTY(p_report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||p_param_list);
    message('pfaction='||hidden_action);
    -- Based on the parameter list make the call to run report
    if NOT id_null(p_param_list) and (upper(p_report_otherparam) like '%PARAMFORM=NO%') then
         vc_report_job_id := RUN_REPORT_OBJECT(p_report_id,p_param_list);
    else
    vc_report_job_id:=RUN_REPORT_OBJECT(p_report_id);
    end if;
    message('Report job id = '||vc_report_job_id);
    /* The report output is not delivered automatically to the client, which is okay
    because the Web is a request model. Thus the next step is to check if the report finished.
    vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
    WHILE vc_rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    vc_rep_status := report_object_status(vc_report_job_id);
    END LOOP;
    v_rep_job_id := substr(vc_report_job_id,length(v_report_server)+2,length(vc_report_job_id));
    --message(v_rep_job_id);
    IF vc_rep_status='FINISHED' THEN
    /* Call the Report output to be displayed in a separate browser window. The URL
    for relative addressing is only valid when the Reports Server is on the same host
    as the Forms Server. For accessing a Remote Reports Server on a different
    machine, you must use the prefix http://hostname:port/
    --web.show_document ('/<virtual path>/<reports cgi or servlet name>/getjobid='||
    --vc_report_job_id ||'?server='|| '<ReportServerTnsName>','_blank');
    WEB.SHOW_DOCUMENT(v_report_servlet||'/getjobid'||v_rep_job_id||'?server='||v_report_server,' _blank');
    -- copy outputfile to provided destination
    if (v_rep_file_to is not null) and (v_rep_file_from is not null) then
    -- copy in windows
    v_host_string := 'cmd /c copy ' ||v_rep_file_from|| ' ' ||v_rep_file_to;
    message(v_host_string); message(' ');
    -- client_host(v_host_string);
    end if;
    ELSE
    message (SQLERRM);
    END IF;

  • My performance is very slow when I run graphs. How do I increase the speed at which I can do other things while the data is being updated and displayed on the graphs?

    I am doing an an aquisition and displaying the data on graphs. When I run the program it is slow. I think because I have the number of scans to read associated with my scan rate. It takes the number of seconds I want to display on the chart times the scan rate and feeds that into the number of samples to read at a time from the AI read. The problem is that it stalls until the data points are aquired and displayed so I cannot click or change values on the front panel until the updates occur on the graph. What can I do to be able to help this?

    On Fri, 15 Aug 2003 11:55:03 -0500 (CDT), HAL wrote:
    >My performance is very slow when I run graphs. How do I increase the
    >speed at which I can do other things while the data is being updated
    >and displayed on the graphs?
    >
    >I am doing an an aquisition and displaying the data on graphs. When I
    >run the program it is slow. I think because I have the number of
    >scans to read associated with my scan rate. It takes the number of
    >seconds I want to display on the chart times the scan rate and feeds
    >that into the number of samples to read at a time from the AI read.
    >The problem is that it stalls until the data points are aquired and
    >displayed so I cannot click or change values on the front panel until
    >the updates occur on the graph. What can I do to be a
    ble to help
    >this?
    It may also be your graphics card. LabVIEW can max the CPU and you
    screen may not be refreshing very fast.
    --Ray
    "There are very few problems that cannot be solved by
    orders ending with 'or die.' " -Alistair J.R Young

  • Error when displaying 2 DVT Graph in same page

    Hi,
    I am using jdev 11g.
    I have a sample page with 2 graph on it. When the page is displayed only one graph is shown.
    <af:form>
    <dvt:graph id="p102" binding="#{TestManagerBean.myGraph}"
    graphType="#{TestManagerBean.graphType}" threeDEffect="true"
    shortDesc="graph pie" contentDelivery="immediate"
    annotationsVisibility="SHOW_ALL" animationIndicators="ALL"
    animationOnDataChange="AUTO" animationOnDisplay="AUTO"
    markerTooltipType="MTT_VALUES"
    noDataErrorText="No Data Found"
    inlineStyle="width: 400px;height: 300px;">
    </dvt:graph>
    <dvt:graph id="p1022" binding="#{TestManagerBean.myGraph}"
    graphType="#{TestManagerBean.graphType}" threeDEffect="true"
    shortDesc="graph pie" contentDelivery="immediate"
    annotationsVisibility="SHOW_ALL" animationIndicators="ALL"
    animationOnDataChange="AUTO" animationOnDisplay="AUTO"
    markerTooltipType="MTT_VALUES"
    noDataErrorText="No Data Found"
    inlineStyle="width: 400px;height: 300px;">
    </dvt:graph>
    </af:form>
    Kindly advice
    Emile BITAR

    Hi Emile BITAR,
    binding="#{TestManagerBean.myGraph}"Have you tried creating separate bindings for each of the graph?
    Regards,
    Chan Kelwin

  • How to display a 'Directed Graph Structure' in ADF

    Hi
    I have a requirement where I have to display a 'Directed Graph Structure' (one with multiple nodes and links ). http://flylib.com/books/en/2.264.1.159/1/
    As of now there is no dvt component to support it.
    So I used a third party JS lib to draw the graph in HTML.
    Now I want to open this HTML page as pop in my adf application using JS.
    Please suggest me how to do that or any alternative way to display the graph structure.
    Thanks

    is there another way? or is it just not possible?
    gr
    Joeri

  • DISPLAYING PARAMETER LAYOUT WHILE EXECUTING REPORTS THROUGH WEB

    Good Day all,
    With reference to the above subject i would like to ask for help that how can i get the parameter screen when a user/clients runs reports through browser web ?.
    i hardcoded in the source and deployed on the server,its working perfectly.
    I need to define the parameters,is there n e way/s please assist.
    second is there any method/s or example by which i can call report through form server,
    the form server is working ok.. need to call a report through this form ,
    please assist with your earliest
    awaiting for your earliest and positiver response regards

    Mohd,
    (1). To display parameter form in web, you can either pass parameter "paramform=yes" in url, or specify %P in corresponding key of the cgicmd.dat file.
    (2). To call Reports from Forms, you can either call reports 9i server directly (via run_report_object), or via web.show_document() to call the cgi/servlet.
    Regards,
    -Jeff

  • Display multiple Waveform-Graphs on a separate Frontpanel

    Hi there,
    I'm looking for a solution to display multiple waveform-graphs on a separate frontpanel.
    In my application I measure a number of channels (number is a user-input). The signals I want to display each in a separate waveform-graph, because they have different scales. They shall be arranged that way, that the user can switch them on and off or arranges them on the screen, while the application is running (measuring). He shall also be able to maximize all graphs or a graph window to have a closer look at the signals.
    I already tried several things.
    1. I placed the maximum number of graphs in a separate vi, which I start in my application and then switch the frontpanel on and off via a property-node. The values I also write via the references of the waveform-array, which I place in an array. This way I can also change the propertys of each plot (scale, xmin xmax, etc), but I always have all graphs on the screen (also the unused).
    2. I then tried to change the visible-property of the unused graphs, but I cannot scale and rearrange the remaining graphs to the full frontpanel-size, because this property is read-only.
    3. I placed just one waveform-graph in the vi and then start as many vis, as I need. This is cool, because I also can program the position and size of each frontpanel, so that they are arranged in a grid on the display, but all the graphs are separate and it is uncomfortable if the user had to arrange them separate. The windows need to be docked ore something like that.
    4. I tried to place the graph-vis in subpanels, but then I cannot change the position and size of the vis programmatically.
    Has anyone an idea, how to solve this?
    I am using LabView2009Sp1 Professional Development System
    Thanks Norman

    Thanks so far,
    I attached some examples of what I tried already.
    1. MaximumNumberOf Graphs - I show 6 graphs although only two are needed. I cannot rescale the used ones to the full screen size, because the property is read-only
    2. RescaledFrontpanel - I switch the unused graphs to invisible, resize the frontpanel to hide the unused graphs, but now the window is not zoomable
    3. GridOfWindows displays the desired grid of graphs in separate windows, but they don't stick together
    I hope this explains the situation better.
    Norman
    Attachments:
    multigraph.llb ‏136 KB

  • Need Help: Dynamically displaying parameter values for a procedure.

    Problem Statement: Generic Code should display the parameter values dynamically by taking "package name" and "procedure name" as inputs and the values needs to be obtained from the parameters of the wrapper procedure.
    Example:
    a) Let us assume that there is an application package called customer.
    create or replace package spec customer
    as
    begin
    TYPE cust_in_rec_type IS RECORD
    cust_id NUMBER,
    ,cust_name VARCHAR2(25) );
    TYPE cust_role_rec_type IS RECORD
    (cust_id NUMBER,
    role_type VARCHAR2(20)
    TYPE role_tbl_type IS TABLE OF cust_role_rec_type INDEX BY BINARY_INTEGER;
    Procedure create_customer
    p_code in varchar2
    ,p_cust_rec cust_in_rec_type
    ,p_cust_roles role_tbl_type
    end;
    b) Let us assume that we need to test the create customer procedure in the package.For that various test cases needs to be executed.
    c) We have created a testing package as mentioned below.
    create or replace package body customer_test
    as
    begin
    -- signature of this wrapper is exactly same as create_customer procedure.
    procedure create_customer_wrapper
    p_code in varchar2
    ,p_cust_rec customer.cust_in_rec_type
    ,p_cust_roles customer.role_tbl_type
    as
    begin
    //<<<<<---Need to display parameter values dynamically for each test case-->>>>>
    Since the signature of this wrapper procedure is similar to actual app procedure, we can get all the parameter definition for this procedure using ALL_ARGUMENTS table as mentioned below.
    //<<
    select * from ALL_ARGUMENTS where package_name = CUSTOMER' and object_name = 'CREATE_CUSTOMER'
    but the problem is there are other procedures exists inside customer package like update_customer, add_address so need to have generalized code that is independent of each procedure inside the package.
    Is there any way to achieve this.
    Any help is appreciated.
    // >>>>
    create_customer
    p_code => p_code
    ,p_cust_rec => p_cust_rec
    ,p_cust_roles => p_cust_roles
    end;
    procedure testcase1
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 1;
    l_cust_rec.cust_name := 'ABC';
    l_cust_roles(1).cust_id := 1;
    l_cust_roles(1).role_type := 'Role1';
    create_customer_wrapper
    p_code => 'code1'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    procedure testcase2
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 2;
    l_cust_rec.cust_name := 'DEF';
    l_cust_roles(1).cust_id := 2;
    l_cust_roles(1).role_type := 'Role2';
    create_customer_wrapper
    p_code => 'code2'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    end;

    Not possible to dynamically in a procedure, deal with the parameter values passed by a caller. There is no struct or interface that a procedure can use to ask the run-time to give it the value of the 1st or 2nd or n parameter.
    There could perhaps be some undocumented/unsupported method - as debugging code (<i>DBMS_DEBUG</i>) is able to dynamically reference a variable (see Get_Value() function). But debugging requires a primary session (the debug session) and the target session (session being debugged).
    So easy answer is no - the complex answer is.. well, complex as the basic functionality for this do exists in Oracle in its DBMS_DEBUG feature, but only from a special debug session.
    The easiest way would be to generate the wrapper itself, dynamically. This allows your to generate code that displays the parameter values and add whatever other code needed into the wrapper. The following example demonstrates the basics of this approach:
    SQL> -- // our application proc called FooProc
    SQL> create or replace procedure FooProc( d date, n number, s varchar2 ) is
      2  begin
      3          -- // do some stuff
      4          null;
      5  end;
      6  /
    Procedure created.
    SQL>
    SQL> create or replace type TArgument is object(
      2          name            varchar2(30),
      3          datatype        varchar2(30)
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type TArgumentList is table of TArgument;
      2  /
    Type created.
    SQL>
    SQL> -- // create a proc that creates wrappers dynamically
    SQL> create or replace procedure GenerateWrapper( procName varchar2 ) is
      2          procCode        varchar2(32767);
      3          argList         TArgumentList;
      4  begin
      5          select
      6                  TArgument( argument_name, data_type )
      7                          bulk collect into
      8                  argList
      9          from    user_arguments
    10          where   object_name = upper(procName)
    11          order by position;
    12 
    13          procCode := 'create or replace procedure Test'||procName||'( ';
    14          for i in 1..argList.Count
    15          loop
    16                  procCode := procCode||argList(i).name||' '||argList(i).datatype;
    17                  if i < argList.Count then
    18                          procCode := procCode||', ';
    19                  end if;
    20          end loop;
    21 
    22          procCode := procCode||') as begin ';
    23          procCode := procCode||'DBMS_OUTPUT.put_line( '''||procName||''' ); ';
    24 
    25          for i in 1..argList.Count
    26          loop
    27                  procCode := procCode||'DBMS_OUTPUT.put_line( '''||argList(i).name||'=''||'||argList(i).name||' ); ';
    28          end loop;
    29 
    30          -- // similarly, a call to the real proc can be added into the test wrapper
    31          procCode := procCode||'end;';
    32 
    33          execute immediate procCode;
    34  end;
    35  /
    Procedure created.
    SQL>
    SQL> -- // generate a wrapper for a FooProc
    SQL> exec GenerateWrapper( 'FooProc' );
    PL/SQL procedure successfully completed.
    SQL>
    SQL> -- // call the FooProc wrapper
    SQL> exec TestFooProc( sysdate, 100, 'Hello World' )
    FooProc
    D=2011-01-07 13:11:32
    N=100
    S=Hello World
    PL/SQL procedure successfully completed.
    SQL>

  • Saving waveform to retrieve it back to display on waveform graph

    I want to save a waveform that I acquire through my hardware and display it on a sweep chart. Its a time based voltage acquisition. I tried using write to spread sheet or save waveform options in LabVIEW 2009. But when I tried to read it, it only shows me 1 cycle of data(I will be suing a graph here because I want to add cursors to it). I want the exact same whole waveform to be displayed on a graph as I had acquired it. I want to avoid using express vi's since I will be acquiring 10 channels simultaneously so I dont want to slow down the execution speed.
    I am attaching the base vi that i made to read and write the waveform to a file(I am using simulate signal in this attached vi just to simulate a square wave and check my logic functionality).
    Can anyone help, please!
    Thanks in advance.
    Attachments:
    ro_up_read.vi ‏17 KB
    ro_up_write.vi ‏53 KB

    First of all, the "Append" should only be True when i does not equal 0.
    Secondly, you are only dealing with 1 signal, so have the dynamic data converter output a 1D array of scalers.  I then found that I had to transpose the spreadsheet on both sides (read and write).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Write and Read Simulated Signal.png ‏86 KB

  • Help needed with passing data between classes, graph building application?

    Good afternoon please could you help me with a problem with my application, my head is starting to hurt?
    I have run into some difficulties when trying to build an application that generates a linegraph?
    Firstly i have a gui that the client will enter the data into a text area call jta; this data is tokenised and placed into a format the application can use, and past to a seperate class that draws the graph?
    I think the problem lies with the way i am trying to put the data into co-ordinate form (x,y) as no line is being generated.
    The following code is from the GUI:
    +public void actionPerformed(ActionEvent e) {+
    +// Takes data and provides program with CoOrdinates+
    int[][]data = createData();
    +// Set the data data to graph for display+
    grph.showGrph(data);
    +// Show the frame+
    grphFrame.setVisible(true);
    +}+
    +/** set the data given to the application */+
    +private int[][] createData() {+
    +     //return data;+
    +     String rawData = jta.getText();+
    +     StringTokenizer tokens = new StringTokenizer(rawData);+
    +     List list = new LinkedList();+
    +     while (tokens.hasMoreElements()){+
    +          String number = "";+
    +          String token = tokens.nextToken();+
    +          for (int i=0; i<token.length(); i++){+
    +               if (Character.isDigit(token.charAt(i))){+
    +                    number += token.substring(i, i+1);+
    +               }+
    +          }     +
    +     }+
    +     int [][]data = new int[list.size()/2][2];+
    +     int index = -2;+
    +     for (int i=0; i<data.length;i++){+
    +               index += 2;+
    +               data[0] = Integer.parseInt(+
    +                         (list.get(index).toString()));+
    +               data[i][1] = Integer.parseInt(+
    +                         (list.get(index +1).toString()));+
    +          }+
    +     return data;+
    The follwing is the coding for drawing the graph?
    +public void showGrph(int[][] data)  {+
    this.data = data;
    repaint();
    +}     +
    +/** Paint the graph */+
    +protected void paintComponent(Graphics g) {+
    +//if (data == null)+
    +     //return; // No display if data is null+
    super.paintComponent(g);
    +// x is the start position for the first point+
    int x = 30;
    int y = 30;
    for (int i = 0; i < data.length; i+) {+
    +g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);+
    +}+
    +}+

    Thanks for that tip!
    package LineGraph;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class GUI extends JFrame
      implements ActionListener {
      private JTextArea Filejta;
      private JTextArea jta;
      private JButton jbtShowGrph = new JButton("Show Chromatogram");
      public JButton jbtExit = new JButton("Exit");
      public JButton jbtGetFile = new JButton("Search File");
      private Grph grph = new Grph();
      private JFrame grphFrame = new JFrame();   // Create a new frame to hold the Graph panel
      public GUI() {
         JScrollPane pane = new JScrollPane(Filejta = new JTextArea("Default file location: - "));
         pane.setPreferredSize(new Dimension(350, 20));
         Filejta.setWrapStyleWord(true);
         Filejta.setLineWrap(true);     
        // Store text area in a scroll pane 
        JScrollPane scrollPane = new JScrollPane(jta = new JTextArea("\n\n Type in file location and name and press 'Search File' button: - "
                  + "\n\n\n Data contained in the file will be diplayed in this Scrollpane "));
        scrollPane.setPreferredSize(new Dimension(425, 300));
        jta.setWrapStyleWord(true);
        jta.setLineWrap(true);
        // Place scroll pane and button in the frame
        JPanel jpButtons = new JPanel();
        jpButtons.setLayout(new FlowLayout());
        jpButtons.add(jbtShowGrph);
        jpButtons.add(jbtExit);
        JPanel searchFile = new JPanel();
        searchFile.setLayout(new FlowLayout());
        searchFile.add(pane);
        searchFile.add(jbtGetFile);
        add (searchFile, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
        add(jpButtons, BorderLayout.SOUTH);
        // Exit Program
        jbtExit.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
             System.exit(0);
        // Read Files data contents
         jbtGetFile.addActionListener(new ActionListener(){
         public void actionPerformed( ActionEvent e) {
                   String FileLoc = Filejta.getText();
                   LocateFile clientsFile;
                   clientsFile = new LocateFile(FileLoc);
                        if (FileLoc != null){
                             String filePath = clientsFile.getFilePath();
                             String filename = clientsFile.getFilename();
                             String DocumentType = clientsFile.getDocumentType();
         public String getFilecontents(){
              String fileString = "\t\tThe file contains the following data:";
         return fileString;
           // Register listener     // Create a new frame to hold the Graph panel
        jbtShowGrph.addActionListener(this);
        grphFrame.add(grph);
        grphFrame.pack();
        grphFrame.setTitle("Chromatogram showing data contained in file \\filename");
      /** Handle the button action */
      public void actionPerformed(ActionEvent e) {
        // Takes data and provides program with CoOrdinates
        int[][]data = createData();
        // Set the data data to graph for display
        grph.showGrph(data);
        // Show the frame
        grphFrame.setVisible(true);
      /** set the data given to the application */
      private int[][] createData() {
           String rawData = jta.getText();
           StringTokenizer tokens = new StringTokenizer(rawData);
           List list = new LinkedList();
           while (tokens.hasMoreElements()){
                String number = "";
                String token = tokens.nextToken();
                for (int i=0; i<token.length(); i++){
                     if (Character.isDigit(token.charAt(i))){
                          number += token.substring(i, i+1);
           int [][]data = new int[list.size()/2][2];
           int index = -2;
           for (int i=0; i<data.length;i++){
                     index += 2;
                     data[0] = Integer.parseInt(
                             (list.get(index).toString()));
                   data[i][1] = Integer.parseInt(
                             (list.get(index +1).toString()));
         return data;
    public static void main(String[] args) {
    GUI frame = new GUI();
    frame.setLocationRelativeTo(null); // Center the frame
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("Clients Data Retrival GUI");
    frame.pack();
    frame.setVisible(true);
    package LineGraph;
    import javax.swing.*;
    import java.awt.*;
    public class Grph extends JPanel {
         private int[][] data;
    /** Set the data and display Graph */
    public void showGrph(int[][] data) {
    this.data = data;
    repaint();
    /** Paint the graph */
    protected void paintComponent(Graphics g) {
    //if (data == null)
         //return; // No display if data is null
    super.paintComponent(g);
    //Find the panel size and bar width and interval dynamically
    int width = getWidth();
    int height = getHeight();
    //int intervalw = (width - 40) / data.length;
    //int intervalh = (height - 20) / data.length;
    //int individualWidth = (int)(((width - 40) / 24) * 0.60);
    ////int individualHeight = (int)(((height - 40) / 24) * 0.60);
    // Find the maximum data. The maximum data
    //int maxdata = 0;
    //for (int i = 0; i < data.length; i++) {
    //if (maxdata < data[i][0])
    //maxdata = data[i][1];
    // x is the start position for the first point
    int x = 30;
    int y = 30;
    //draw a vertical axis
    g.drawLine(20, height - 45, 20, (height)* -1);
    // Draw a horizontal base line4
    g.drawLine(20, height - 45, width - 20, height - 45);
    for (int i = 0; i < data.length; i++) {
    //int Value = i;      
    // Display a line
    //g.drawLine(x, height - 45 - Value, individualWidth, height - 45);
    g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);
    // Display a number under the x axis
    g.drawString((int)(0 + i) + "", (x), height - 30);
    // Display a number beside the y axis
    g.drawString((int)(0 + i) + "", width - 1277, (y) + 900);
    // Move x for displaying the next character
    //x += (intervalw);
    //y -= (intervalh);
    /** Override getPreferredSize */
    public Dimension getPreferredSize() {
    return new Dimension(1200, 900);

  • Displaying parameter form in Portal

    we have reports created using 9i reports builder and are running them using 9ias portal version 9.0.2.2.22
    can we get the parameter form displaying before the report is run, as at the moment it either gives an error because parameters have not been entered, or it runs with the last used parameters which may not be the ones required for this time ( and so reports take awhile to run)

    hi
    You could look at http://www.oracle.com/technology/products/discoverer/files/viewlets/1012_dashboard.html
    I don´t remember if here you create the simple parameter form. But there is a portlet called "Simple Parameter Form", you can find it at Portlet Builders. You can reach this link in your Oracle portal in the Edit link, in the add portlet link.
    then you can follow the wizard to create your parameter portlet
    After this step you should link the parameters you send through this portlet with the page and the other portlets.
    I hope this help

  • Chinese can not be displayed in the graph report

    I create a report using Graph Wizard , the graph contains Chinese. the report on my windows client runs ok, but on the linux server ,the Chinese in the graph could not be displayed,shows some boxes, but the paper layout shows Chinese normal.

    Can anyone help me ? Or have anyone to tell me how the report generated graphics.

Maybe you are looking for

  • How can I get my MacBook to recognize my external hard drive again?

    Hi, I own a 500GB Toshiba external hard drive, and I've been using it for months now, and up until today it's worked flawlessly. I never formatted it, I just used it as a mass storage device so that I wouldn't have compatibility issues with PC's beca

  • CSCum57517 - ASDM launcher is not working with Java 7u51 - 1

    I am running 1.7.0_51_b13 with ADSM 7.1.5(100) and I still have the issue.   Bug stiill exists in the hotfix.

  • Can anyone help ? -Deploy JSP to Tomcat

    I am trying to deploy my JSP app to Tomcat 3.1, but goet error message like this: Error: 500 Location: /amtts/main.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSPC:\Apache Group\Tomcat\work\localhost_808

  • Can anyone help me in a problem with PL/SQL Tables & the Java getArray()

    The problem is the following: I would tike to get a PL/SQL Table (a table of varchar2) into a Java String Array. It works very well except that instead of getting the characters in the PL/SQL Table I receive the character codes in each string. In the

  • Removing empty text frames

    trying to remove any text frames with empty content but it doesn't seem to be removing correct textFrame layers, any idea what I might be doing wrong? var numberOfEmptyTextBoxes = 0; var layersWithNoText = new Array(); if ( app.documents.length > 0 )