Help passing values to graphics

I am able to create some graphics in a stand-alone app, but I am having some difficulty passing values from one class to a sub class of JPanel.
I can create a blank bar graph, the x and y axis, the title and labels, etc, but I need some values from another class passed in, and I'm not sure where to do this. Any suggestions would be appreciated.
Below is a simple gradebook program, and I want to be able to graph the individual scores along with the averages on each of three tests. The problem is in the DrawChart class.
thanks in advance!
//This starts the graphical representation of the data<br />
//----------------------------------------------------------------------------------------------------------//<br />
class DrawChart extends JPanel<br />
{ <br />
// constructor<br />
public DrawChart()<br />
{<br />
setBackground( Color.WHITE ); // set the background to white<br />
} // end DrawChart constructor<br />
<br />
// draws a Chart using concentric circles<br />
public void paintComponent( Graphics g, )<br />
{<br />
super.paintComponent( g );<br />
g.setColor(Color.BLACK);<br />
g.drawLine(30, 25, 30, 130); //this is the y-axis<br />
g.drawLine(25, 130, 605, 130); //this is the x-axis<br />
Font font = new Font("Serif", Font.PLAIN, 10);<br />
g.setFont(font);<br />
<br />
<br />
//each test score width = 10, space = 5, width for avg = 20, buffer between tests = 40<br />
//(10 bars and spaces = 150) + 20 = 170 for each test <br />
//170 * 3 + 40*2 = total width = 570, but allow the <br />
<br />
//The following are the values shown left of the y-axis. If there were many more, it would have been worth <br />
//while to set up a for/next loop to generate them<br />
//because of the way these are set, they are all left-justified <br />
g.drawString("100", 10, 30);<br />
g.drawString("90", 15, 40);<br />
g.drawString("80", 15, 50);<br />
g.drawString("70", 15, 60);<br />
g.drawString("60", 15, 70);<br />
g.drawString("50", 15, 80);<br />
g.drawString("40", 15, 90);<br />
g.drawString("30", 15, 100);<br />
g.drawString("20", 15, 110);<br />
g.drawString("10", 15, 120);<br />
//This will set up the labels below the x-axis<br />
g.drawString("Test 1", 65, 145);<br />
g.drawString("Avg.", 150,145);<br />
g.drawString("Test 2", 275, 145);<br />
g.drawString("Avg.", 360,145);<br />
g.drawString("Test 3", 485, 145);<br />
g.drawString("Avg.", 570,145);<br />
//set up light grey horz lines to make it easier to read the values<br />
g.setColor(Color.LIGHT_GRAY);<br />
g.drawLine(30, 30, 600, 30);//100%<br />
g.drawLine(30, 40, 600, 40);//90%<br />
g.drawLine(30, 50, 600, 50);//80%<br />
g.drawLine(30, 60, 600, 60);//70%<br />
g.drawLine(30, 70, 600, 70);//60%<br />
g.drawLine(30, 80, 600, 80);//50%<br />
g.drawLine(30, 90, 600, 90);//40%<br />
g.drawLine(30, 100, 600, 100);//30%<br />
g.drawLine(30, 110, 600, 110);//20%<br />
g.drawLine(30, 120, 600, 120);//10%<br />
int x; //this will be used to move the starting point <br />
x = 35; //initialize to 35 for the first bar<br />
g.setColor(Color.BLACK);<br />
for (int i = 0; i<3;i++)<br />
{<br />
for (int j = 0;j<10;j++)<br />
{<br />
if (testScores[i][j] == testMin) g.setColor(Color.RED); //red is bad - lowest score
else if(testScores[i][j] == testMax[i]) g.setColor(Color.GREEN);//green is good
g.fillRect(x,30 + 100 - testScores[i][j], 10, testScores[i][j]);//after drawing, set the color back to the default, black
g.setColor(Color.BLACK);
x = x + 15; //this will move the horz position for each of the 10 scores
} //this ends the inner loop, i
g.setColor(Color.CYAN);
g.fillRect(x,30 + 100 - testAvg[i], 20, testAvg[i]);//this will print the avg twice as wide
x = x + 40; //nice wide buffer to separate each group of tests the extra 40 at the end will not affect anything
} //ends outter loop, i }
} // end method paintComponent
// } // end class DrawChart
}//ends paintComponent method
} //End of main method
} //End of class

jeff_cia wrote:
Any thoughts on how to pass the values?Again, I can't read your code, and I doubt anyone else can. I can only give you the generic recommendation that if the data doesn't change you have setters in the class that needs to receive the data and getters in the class that's producing the data. If the data does change dynamically, then you'll probably want to use the Observable design pattern or something similar, something easy to do in Swing.

Similar Messages

  • Some help passing values

    Maybe it's because Im so tired, but I am having a horrible day trying to run anything in more than one method.
    I set everything as public, so I don't know what I am doing wrong.
    import java.io.*;
    import java.util.*;
        public class mainMenu extends CalcSalesTax{
        public static int UI()throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
             int selected = Integer.parseInt(input.readLine());
             double total = 0;
             public static void Menu(){
             System.out.println("Please Select:");
             System.out.println("1: to Calculate Tax");
             System.out.println("or");
             System.out.println("0 to Exit");
             selected = Integer.parseInt(input.readLine());
             return selected;
            public static  void main(String[] args)throws Exception {
            selected = UI();
            BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            while (selected==1){
             switch(selected){
             case 0:
             return;
             case 1:
             salesTax();
             break;
    }I am getting errors like, cannot find "selected"... please help me out... is it a syntax thing?

    For better guidance, you will need to post your code for the superclass CalcSalesTax as we cannot guess what class / instance fields and methods it has.
    I think you have a problem with understanding the scope of variables. Take a quick look at
    {color:#0000ff}http://home.cogeco.ca/~ve3ll/jatutor2.htm#st{color}
    Execution blocks are the sections of code that start and end with curly brackets. Variables maintain their definition (or 'scope') until the end of the execution block that they are defined in.
    FWIW I have reworked your code, but I expect you to ask about the changes you don't understand -- and post the updated code for both MainMenu and CalcSalesTax and any superclass/es of CalcSalesTax.import java.io.*;
    import java.util.*;
    public class MainMenu extends CalcSalesTax {
       int selected = 1;
       BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
       public MainMenu () {
          while (selected == 1) {
             menu ();
             switch (selected) {
                case 0:
                   System.exit (0);
                case 1:
                   salesTax(); // mehod in super class ?
       private void menu () {
          System.out.println("Please Select:\n1: to Calculate Tax\nor\n0 to Exit");
          String inString = input.readLine()
          try {
             selected = Integer.parseInt(inString);
          } catch (NumberFormatException ex) {
             selected = 0;
             ex.printStackTrace ();
       public static void main (String[] args) throws Exception {
          MainMenu mainMenu = new MainMenu ();
    }Disclaimer: I don't have a JDK on this office machine, so there may be typos in the code posted.
    db
    Edited by: Darryl.Burke to remove whatever typos I could spot.

  • Re: Help needed in passing values from workflow to Approve Forms

    Dear Experts,
    how do I pass values from a workflow to a step (Form) - approve form?
    I am using a customized table structure as my data source (FORMCONTAINERELEMENT) but am stuck on how to access the data when i get to to the screen painter's flow logic... What am i missing? Can you give me a step by step example. the ones i see on the net are input fields that update the screen... nothing that shows value being passed from the outside.
    I need to pass an exisitng value in the workflow into the form for approval of the the assigned agent.
    Please help!!
    Thank you.

    Hello !
             Create a method just before the form step.This method should populate the values for the fields maintained in the form.
             Pass the values populated from this method to your customized table structure (data source).In other words, you have to pass all the values to the workflow container.
            To the step, pass this workflow container by binding.In the control tab of form step, you have to do the binding.
    Regards,
    S.Suresh

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • Passing Values Child to Child...Need Help

    I am a bit of a noob, and I'm having a problem.  I had posted about this before but I think I was explaining what I need to do in way to much of a complicated manner so I'm going to try and simplify this a bit.
    I have 5 swf's.
    - main.swf (parent)
    - child01.swf
    - child02.swf
    - child03.swf
    - child04.swf
    When main.swf runs, it loads child03.swf on the bottom (eventhough levels are not relevent in AS3) child01.swf and child02.swf load on top of child03.swf.
    main.swf has an arrow button, to proceed to the next screen.  When the arrow button is pressed it unloads child01.swf, child02.swf and child03.swf, it then loads child04.swf.
    Here is my problem... child03.swf has dynamic text boxes, named tf0 - tf14, which get passed values by functions in each of those files.  I need to pass these same values to dynamic text boxes on child04.swf.
    The thing that concerns me is that child01.swf and child02.swf get unloaded when the arrow button is pressed.  I would assume that the values stored in these text boxes get unloaded as well.  If this is the case I need to store these values before the unload happens, which I am not sure how to do.
    Then once I store these values they need to pass to the dynamic text boxes, named tf15 - tf 29, in child04.swf.  I have been researching, and researching and cant find a solution.  Some talk about using LocalConnection.  kglad tried pointing me in the right direction using MovieClip, but I can't seem to get it working.
    I am including the script for the relevent files.
    main.swf
    stop();
    var Allergy_Tag:URLRequest = new URLRequest("child01.swf");
    var Info_Tag:URLRequest = new URLRequest("child02.swf");
    var Sec_A_B:URLRequest = new URLRequest("child03.swf");
    var Sec_C_D:URLRequest = new URLRequest("child04.swf");
    var AT_Loader:Loader = new Loader();
    var IT_Loader:Loader = new Loader();
    var AB_Loader:Loader = new Loader();
    var CD_Loader:Loader = new Loader();
    AT_Loader.x = 0;
    AT_Loader.y = 85;
    IT_Loader.x = 483;
    IT_Loader.y = 85;
    AB_Loader.x = 0;
    AB_Loader.y = 0;
    CD_Loader.x = 0;
    CD_Loader.y = 0;
    AT_Loader.load(Allergy_Tag);
    IT_Loader.load(Info_Tag);
    AB_Loader.load(Sec_A_B);
    CD_Loader.load(Sec_C_D);
    addChild(AT_Loader);
    addChild(IT_Loader);
    addChild(AB_Loader);
    //arrow btn actions
    arrowBtnMain.buttonMode = true;
    arrowBtnMain.addEventListener(MouseEvent.ROLL_OVER , arrowBtnMainRollOver);
    arrowBtnMain.addEventListener(MouseEvent.CLICK, arrowBtnMainClick);
    function arrowBtnMainRollOver(event:MouseEvent):void{
    arrowBtnMain.gotoAndPlay(2);
    function arrowBtnMainClick(event:MouseEvent):void{
    gotoAndStop(2);
        AT_Loader.unload();
        IT_Loader.unload();
        AB_Loader.unload();
        addChild(CD_Loader);
    child03.swf
    stop();
    //changes text size on checkboxes
    import fl.managers.StyleManager;
    var textf:TextFormat = new TextFormat();
    textf.size = 9;
    StyleManager.setComponentStyle(CheckBox, "textFormat", textf);
    StyleManager.setComponentStyle(CheckBox, "textPadding", 2);
    //handles tag labels
    var currentTF:uint = 0;
    function clickCB(evt:MouseEvent): void {
        this["tf"+currentTF].text = CheckBox(evt.target).label;
      currentTF += 1;
    for(var i:uint=0; i<30; i++){
    this["cBox"+i].addEventListener(MouseEvent.CLICK, clickCB);
    //handles text boxes
    f_name.addEventListener(Event.CHANGE,copyText);
    l_name.addEventListener(Event.CHANGE,copyText);
    emer_01.addEventListener(Event.CHANGE,copyText);
    emer_02.addEventListener(Event.CHANGE,copyText);
    emer_03.addEventListener(Event.CHANGE,copyText);
    function copyText(e:Event):void
        tf10.text = f_name.text;
        tf11.text = l_name.text;
        tf12.text = emer_01.text;
        tf13.text = emer_02.text;
        tf14.text = emer_03.text;
    child04.swf
    stop();
    import fl.managers.StyleManager;
    var textf:TextFormat = new TextFormat();
    textf.size = 12;
    StyleManager.setComponentStyle(CheckBox, "textFormat", textf);
    StyleManager.setComponentStyle(CheckBox, "textPadding", 2);
    //handles allergy beads
    var currentTF:uint = 30;
    function clickCB(evt:MouseEvent): void {
         this["tf"+currentTF].text = CheckBox(evt.target).label;
      currentTF += 1;
    for(var i:uint=30; i<60; i++){
    this["cBox"+i].addEventListener(MouseEvent.CLICK, clickCB);
    Here is an example of some of the script I have tried to impliment on child04.swf to call the values of the dynamic text boxes on child03.swf
    tf15.addEventListener(Event.CHANGE,importText);
    function importText(e:Event):void
        tf15.text = MovieClip(AT_Loader.content).tf0;

    Thx kglad,
    I'm still working with it.  However I am getting a strange output message.  I was working with the script to get those to pass, and started getting it.  I then removed the added script and I'm still getting it.
    TypeError: Error #1034: Type Coercion failed: cannot convert "
    " to flash.display.MovieClip.
    at child03_fla::MainTimeline/frame1()
    Here is the script I currently have on the main.swf and still recieving this message... Weird because at this point I'm not trying to convert anything to a MovieClip
    stop();
    var Allergy_Tag:URLRequest = new URLRequest("allergy_tags.swf");
    var Info_Tag:URLRequest = new URLRequest("info_tag.swf");
    var Sec_A_B:URLRequest = new URLRequest("checks_and_texts.swf");
    var Sec_C_D:URLRequest = new URLRequest("sec_c_d.swf");
    var AT_Loader:Loader = new Loader();
    var IT_Loader:Loader = new Loader();
    var AB_Loader:Loader = new Loader();
    var CD_Loader:Loader = new Loader();
    AT_Loader.x = 0;
    AT_Loader.y = 85;
    IT_Loader.x = 483;
    IT_Loader.y = 85;
    AB_Loader.x = 0;
    AB_Loader.y = 0;
    CD_Loader.x = 0;
    CD_Loader.y = 0;
    AT_Loader.load(Allergy_Tag);
    IT_Loader.load(Info_Tag);
    AB_Loader.load(Sec_A_B);
    CD_Loader.load(Sec_C_D);
    addChild(AT_Loader);
    addChild(IT_Loader);
    addChild(AB_Loader);
    //arrow btn actions
    arrowBtnMain.buttonMode = true;
    arrowBtnMain.addEventListener(MouseEvent.ROLL_OVER , arrowBtnMainRollOver);
    arrowBtnMain.addEventListener(MouseEvent.CLICK, arrowBtnMainClick);
    function arrowBtnMainRollOver(event:MouseEvent):void{
    arrowBtnMain.gotoAndPlay(2);
    function arrowBtnMainClick(event:MouseEvent):void{
    AT_Loader.unload();
    IT_Loader.unload();
    AB_Loader.unload(); 
    addChild(CD_Loader);
    removeChild(arrowBtnMain);

  • Passing values from a FORM to another FORM

    Hi,
    I have to pass values from FORM "A" to FORM "B". What is the best way to do this?\
    Can I use a GLOBAL variable?
    Thanks,
    Marc.

    I think he meant the global namespace.
    You set a :global_your_name_here to a value and that value is available in your entire application. See the help file section on the global namespace for more information.
    Forms parameters are parameters that you form picks up from the outside when it starts. The calling entity must supply them in the URL or they will be set to null. You set them up in the object navigator in the Parameters node.

  • Script fails when passing values from pl/sql to unix variable

    Script fails when passing values from pl/sql to unix variable
    Dear All,
    I am Automating STATSPACK reporting by modifying the sprepins.sql script.
    Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
    I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
    From the sprepins.sql script
    variable bid number;
    variable eid number;
    begin
    select begin_snap into :bid from db_snap;
    select end_snap into :eid from db_snap;
    end;
    This fails with the following error:
    DB Name DB Id Instance Inst Num Release Cluster Host
    RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
    :ela := ;
    ERROR at line 4:
    ORA-06550: line 4, column 17:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    &lt;a string literal with character set specification&gt;
    &lt;a number&gt; &lt;a single-quoted SQL string&gt; pipe
    The symbol "null" was substituted for ";" to continue.
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev su
    But when I change the select statements below the report runs successfully.
    variable bid number;
    variable eid number;
    begin
    select '46' into :bid from db_snap;
    select '47' into :eid from db_snap;
    end;
    Even changing the select statements to:
    select TO_CHAR(begin_snap) into :bid from db_snap;
    select TO_CHAR(end_snap) into :eid from db_snap;
    Does not help.
    Please Help.
    TIA,
    Nischal

    Hi,
    could it be the begin_ and end_ Colums of your query?
    Seems SQL*PLUS hs parsing problems?
    try to fetch another column from that table
    and see if the error raises again.
    Karl

  • How to avoid popup & pass value dynamically in 'F4IF_FIELD_VALUE_REQUEST' ?

    Hello Experts,
    I am trying to test usage of f4 help function module.
    We want to dynamically pass values from remote machines into the given input parameters of a Given Search help and receive the output into a table (no dialogs required .. so no pop ups )
    I wrote a test program to just test if we can really do that at runtime ?
    This program pops up the window of search help First I want to surpress that window and Second I have no clue
    ( How to pass the input parameters as value eg. 20 to a given field as we pass manually )
    Can some one suggest something here ?
    REPORT  ZTEST_F4_TEST.
    data lt_return TYPE TABLE OF DDSHRETVAL.
    data ls_return TYPE DDSHRETVAL.
    data lt_return_ddic TYPE TABLE OF zDDSHRETVAL.
    data ls_return_ddic TYPE zDDSHRETVAL.
    PARAMETERS ptable type tabname.
    PARAMETERS pfield type fieldname.
    PARAMETERS pshelp type SHLPNAMe.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname                   = ptable
        fieldname                 = pfield
        SEARCHHELP                = pshelp
    *   SHLPPARAM                 = ' '
    *   DYNPPROG                  = ' '
    *   DYNPNR                    = ' '
    *   DYNPROFIELD               = ' '
    *   STEPL                     = 0
    *    VALUE                     = ' '
        MULTIPLE_CHOICE           = 'X'
        DISPLAY                   = 'F'
        SUPPRESS_RECORDLIST       = 'X'
    *   CALLBACK_PROGRAM          = ' '
    *   CALLBACK_FORM             = ' '
    *   SELECTION_SCREEN          = ' '
    * IMPORTING
    *   USER_RESET                =
    TABLES
       RETURN_TAB                = lt_return
    * EXCEPTIONS
    *   FIELD_NOT_FOUND           = 1
    *   NO_HELP_FOR_FIELD         = 2
    *   INCONSISTENT_HELP         = 3
    *   NO_VALUES_FOUND           = 4
    *   OTHERS                    = 5
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    data lv_count type i.
    delete lt_return where fieldname <> pfield.
    sort lt_return by fieldval.
    delete ADJACENT DUPLICATES FROM lt_return COMPARING fieldval.

    Hello Sim,
    We will be exposing the Input parameters and Output lists of the SAP Search helps (simple search helps only) as input output of a Webservice.
    So I need to understand how can we exploit the SAP Search Helps ?
    What function modules can take these inputs as structures  and can provide the output in form of a table ?
    Regards,
    Ravi

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • How can I pass value in status and reason for rejection using BAPI_LEAD_CREATEMULTI when creating multiple lead

    Hello,
    I want pass value in STATUS and Reason for rejection according to requirement when i am creating multiple lead using BAPI_LEAD_CREATEMULTI. Please help me how can i pass value. Please give some sample code that in which table i have to pass values and please also tell me INPUT_FIELDS values. Please help me
    Regards,
    Kshitij Rathore

    Hello,
    Please help me for solve this problem. I am trying to solve problem from last 4 days but i didn't get any solution.
    Regards,
    Kshitij Rathore

  • How to pass values of the prompt through Action Link - URL in 11g

    Hi All,
    I am in OBIEE 11g v6.
    Let's say, I have two dashbaord pages P1 and P2.
    P1 page contains
    1. Prompt PR1 - containing a single column EmpName
    2. Report R1
    P2 page contains
    1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
    2. Report R2
    Requirement :
    Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
    Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
    Thanks,
    Ronny

    Hmm can you give a try one more time with
    Add EmpName name and hide it on report R1 on page P1
    and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
    Other option is read this doc once that helps you how to pass value thru url.
    http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
    You need to have a EmpName as Is Prompted on report R2 on page P2
    If helps pls mark

  • How to pass values to XML complex type of a Webservice using PL/SQL

    HI,
    I need to call a web service from PL/SQL that has an complex type element. That complex type element has 4 child elements each of integer type.
    I want to pass values for this complex type using SOAP_API.add_parameter but I can't understand how to pass the values.
    <xsd:element name="getBestFit">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="circleId" type="xsd:string"/>
                        <xsd:element maxOccurs="1" minOccurs="1" name="usage" type="Q1:UsageInfoType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    <complexType name="UsageInfoType">
         <sequence>
              <element maxOccurs="1" minOccurs="1" name="a1" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a2" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a3" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a4" type="int"/>
         </sequence>
    </complexType>
    Please help me in getting a solution here.
    Thanks in advance.

    Have you tried doing a google search on "SOAP_API.add_parameter" to see what comes back? I see a lot of hits come back so hopefully one of those will help you. I've never used soap_api as I used utl_http to make WS calls. This required me to build the SOAP message (aka XML of a specific nature) by hand and then pass it to the WS using utl_http. How this approach is done via SOAP_API, I can't say.

  • How to pass value in array to another procedure?

    Hello.
    I have created application by Developer form9i.
    And I have some problem about passing value in array to another procedure.
    My code is :
    PROCEDURE p_add_array (col_no in number,
    col_val in varchar2) IS     
    type xrecord is record(col number,vcol varchar2(1000));
    xrec xrecord;
    type varraytype is varying array(42) of xrecord;     
    xvartab varraytype := varraytype();
    alert number;
    BEGIN
    set_application_property(cursor_style,'busy');
    xrec.col := col_no;
    xrec.vcol := col_val;
    xvartab.extend(1);
    xvartab(col) := xrec;
    EXCEPTION
    when others then
    set_application_property(cursor_style,'default');
    alert := f_show_alert('!Error ORA-'||
    to_char(DBMS_ERROR_CODE)||' '||
    substr(DBMS_ERROR_TEXT,1,240),
    'al_stop');          
    END;
    And I want to have
    PROCEDURE p_print_arrey is
    BEGIN
    END;
    So how to bring value of xvartab( ) in p_add_array to use in p_print_array?
    Anybody please help me solve this ploblem.

    Hi,
    Instead of declaring the array locally within the procedure (i.e. p_add_array), define it in the package specification (i.e. Under Program Units).
    -- Shailender Mehta --

  • How to pass values at runtime in JDBC - XI - File scenario

    Hi friends,
    In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
    here are my queries:
    1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
    2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
    Thanks and regards,
    Nitin aggarwal.

    Hi Nitin,
    "..So i want to know if i can write multiple select statements in the stored procedure.."
    Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
    <i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
    I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
    Read this, again from the documentation:-
    <i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
    Regards,
    Sushumna

  • Passing value to multi value parameter from SSIS using Report server webservice

    Hi
    I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
    So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
    No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
    My code as below
    ReportExecutionService rs = new ReportExecutionService()
    rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rs.Url = _webserviceURL;
    rs.LoadReport(_reportPath, null);
    ParameterValue[] paramval = new ParameterValue[2];
                            paramval[0] = new ParameterValue();
                            paramval[0].Name = "CountryCode";
                            paramval[0].Value = _countryNames;
                            **paramval[1] = new ParameterValue();
                            paramval[1].Name = "BusinessCode";
                            paramval[1].Value = _businessCode;****
                            rs.SetExecutionParameters(paramval, "en-us");
    I am not sure how to pass value to BusinessCode(Multi value parameter)

    Hi Rajkm,
    In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
    of these ParameterValue objects must be specified same to the parameter name.
    I found a good FAQ article for this scenario:
    How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
    http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
    Hope this helps.
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • How Can I do this - User Authenticate

    Hi, Is there a way to accomplish the following. We are using Citrix MetaframeXP, after the user logs onto the Citrix box, I don't want to have them enter there userid/password again to access my oracle jsp pages. (Website created with jsp from report

  • Oracle Forms Builder 10g

    I have used this code on trigger WHEN-MOUSE-CLICK: Set_View_Property('PIC2',VIEWPORT_Y_POS,ypos); Set_View_Property('PIC2', VISIBLE, PROPERTY_TRUE); Synchronize; But the result was not the one expected. The view in the foreground appears but disappea

  • In mail settings is not listed sent fodera (imap)

    Differently by my IMac and IPhone, on my IPad seems not to be possible to sync sent mails with imap server because in "settings" are only available trash and drafts folders but not The sent one. Furthermore in Mail in each account are listed more cop

  • JMS Channel Cluster Nodes-INACTIVE

    Hello All, We have a Sender - JMS Channel which is green state but the Cluster Node (10 of them) are in WAITING STATE - Channel_Inactive. And Nodes are in GREEN STATE. I have checked the Cache in Integration Directory where I could see RED entries an

  • Jdeveloper tips for the day

    Is Oracle starting a new product JBaker? The following shows up as a tip of the day in Jdeveloper Angel food cake An angel food cake will slice neatly without crumbling if you freeze it first, then thaw it.