Reports 9ids query with parameters

I've created a basic report that pulls from one table. However, I need to have it read two different global variables from the form from which it is run from. I have not been able to make that happen. currently I'm running the report by utilizing WEB.show.document. I need it to pull in the report where two of the fields are equal to the two global variables. How do I do this?? Any help would be great. Part of the URL i've created a keycommand in the cgicmd.dat file.
Thank you

If I understand correctly, you want to base the output of your report on some global data in the form from which you're invoking the report. In that case, you can create user parameters in your report, and base your query on those user parameters (say, P_1 and P_2). Pass the values of these parameters in the report invocation URL.
That's only as far as I understood your question. Also refer to the Building Reports Manual and the Publishing Reports Manual for more insights.
-Manish

Similar Messages

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Schedule Crystal Reports on BOE with Parameters

    Hi
    I would like to schedule Crystal reports with parameters on BOE. How can I pass a parameter if the job is scheduled to run nightly?
    Any help is greatly appreciated.
    Thanks!

    Hello!
    I am going to assume that you know how to schedule a report to run nightly and how to set the parameters/prompts, and what you are really asking is how to change what the parameter/prompt value will be every night?
    If that is the case there is no default functionally that can do that.  How ever you could create a Java application (or another supported programming language) application that will run as a Program Job Object.  The PGO (Program Job Object) will be what is scheduled nightly.  Inside the  PGO you would schedule your report to "run now" with the parameters/prompts you want for that night.
    I hope I have answered your question.  Cheers!

  • Report Designer - Query with variable

    Hi!
    When testing the report designer, we have found an issue - it’s not possible to embedding queries with variables.
    We have found note https://websmp107.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=012006153200000232982006
    that suggest a solution to the issue.
    My question is simply, does anyone know if this is a temporary fix, or is this a constraint that is not planned to be fixed by SAP? The note is a bit ambiguous.
    BR
    bjørn

    Hello,
    Queries with variables are still in restrictions for Report Designer.
    You can use this work-arond creating Query View and fill up the variables. This allows you to define a Report in RD. Then, use Web Appication Designer to include your Report into Web Application and replace the Query View with your initial Query.
    For the integration do following:
    1. Create new Web Template in WAD
    2. Drag-and-drop Web Item "Report"
    3. Go to Property Window in WAD and search for "REPORT" (description Report Design) parameter in Web Items Parameters
    4. Use the button on the right side of the parameter to open Report Designer and choose your Report in it.
    5. You should see that new Data Provider was created in WAD -> Open it and set it to your initial Query.
    5. Save you Web Template and execute in the browser.
    Regards, Karol
    Development BI

  • Is it possible to provide an BEx Web Query with parameters based on iView?

    Hi SAP Portal experts,
    My knowledge of SAP Portal is limited and I ran into the following problem:
    I have got about 60 BEx Web Queries which should be put into some sort of navigation. Furthermore I would like to intodruce one start page where the user can preselect common bex query variables (e.g. company code) by clicking on a map.
    My approach was to put all query links into a BEx Web Application Template. The template includes a JavaScript storing the userdefined values in a cookie. As soon as the user clicks on a link the cookie values are read from that cookie and a query parameter string is set up like "&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=2100&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0P_COCD" and concatenated with the URL for the BEx Query.
    My colleague wants me to put all this into SAP Portal and to create an iView for each BEx Query. How can I achieve that? I have already had a look at the iView property "parameters passed on to BEx Web Application". If I put my parameter string there, it works fine. However, I would like to replace VARIABLE_INPUT_STRING=2100 and VARIABLE=0P_COCD with the values selected by the user by clicking on the map. So how can I set up a parameter or variable in one iView and read it in another iView with a BEx Web Query???
    Thank you very much in advance
    Martin

    I have thought about this. There are some problems here....
    I cannot use the same proxy to invoke the java callout and then based on the code or handler disable it, since
    1) i would have no way to enable back the proxy again.
    2) Also there is some amount of message loss.
    So i will have to use another proxy to do the same, but in this case
    1) what would be the trigger to this proxy?
    2) And how often do i invoke the java callout to see if the URI is up or not? (wouldnt that affect the performance?)
    I am just wondering why did they give an offline URI option in the business service and no similar option in the proxy service, Any Idea?
    Thanks

  • How can I place report on dashboard with parameters

    Hi all,
    If i want to place a report with 2 parameters on the dashboard how can I do it ???
    Regards

    Have a look here in the OBIEE tutorial:
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html
    regards John
    http://obiee101.blogspot.com/

  • Oracle report runs correctly via report builder but call report via form with parameters skips one of the plsql formula

    Hello everybody,
    I created a oracle report i.e Bank Book having banks transactions receipts and payments and opening balance w.e.f 01-jul-2014. parameters are bank code, from_date and to_date. opening balance calculates (return ope from table bankinfo +total receipts-total payments). reports runs correctly via report builder. balances are ok. but the problem is when i run this report via oracle form opening balance return only ope from table bankinfo and skips total receipts-total payments.....
    i dont think so why this happend at all. some body help me...
    thanks
    Abdul Salam

    Hi ,
    This community is to discuss Oracle Application Server specific issues, you can post this query in for better response:
    Oracle Reports (MOSC)
    Regards,
    Prakash.

  • 11G Pivot Query with parameters

    Hello all,
    I would like to find some way, any way to pass parameters to a pivot query. The following pivot query works, but I would like segment2 to be a variable as well as the period names so....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >='007611' and segment2 <='007751' AND period_name in ('SEP-08','OCT-08','NOV-08'))
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08') )
    ....would be something like....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >= :P4_OBJECT_FROM AND and segment2 <=:P4_OBJECT_TO AND period_name in &P4_EPSB_PERIOD_HOLD.)
    pivot
    sum(accounted_dr)
    for period_name in (&P4_EPSB_PERIOD_HOLD.) )
    It is our understanding that we have to hardcode period names and objects, but we would like to get around that. Does anyone have any ideas or tricks?
    Thanks

    lilhelp wrote:
    Hello all,
    We are trying to use the 11G pivot query function with data from Oracle E-Business Suite. We have an 11G database installed with our Oracle APEX. We cannot seem to get the pivot function to work. At a glance, would anyone be able to see any glaring errors in our syntax. I am not certain it is possible to provide test data Why not?
    >
    We are trying to have column headings with the Period Names SEP-08 OCT-08 NOV-08, with rows of segment2 007751 and accounted_dr as the dataset.
    When we run the sql we get an error ORA-00904: "PERIOD_NAME": invalid identifier.
    Any help or insight would be greatly appreciated.
    select * from (
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 = '007751')
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08')
    group by segment2, period_nameDon't use GROUP BY. When you use PIVOT, the grouping is implied by what is in the PIVOT clause and what is not.
    Try this:
    select    *
    from        (
           select  segment2
           ,       accounted_dr
           ,       period_name
           from       gl_je_lines          a
           ,       gl_code_combinations     b
           where       b.code_combination_id = a.code_combination_id
           and       segment2 = '007751'
    pivot       (
           sum (accounted_dr)
           for period_name in ('SEP-08','OCT-08','NOV-08')
    ;which is just your posted query without the GROUP BY clause.

  • Query with parameters syntax

    Hi,
    Could somebody please help with the C# syntax for Oracle Lite. I can execute select statement without parameters, but parameterized query doesn’t work. What is wrong in my code?
    LiteConnection liteConn=new LiteConnection("10270_pwcoffline");
    LiteCommand lcmd=new LiteCommand() ;
    lcmd.Connection=liteConn;
    lcmd.CommandText="Select * from ol_off_dept where office = :off";
    lcmd.CommandType=CommandType.Text ;
    int off = 10;
    LiteParameter p1 = new LiteParameter("off", DbType.VarNumeric, "office");
    p1.Value = off;
    lcmd.Parameters.Add(p1);
    LiteDataAdapter lad=new LiteDataAdapter(lcmd);
    DataSet ds=new DataSet();
    lad.Fill(ds,"TDM");
    this.dataGrid1.DataSource = ds;
    The error is:
    System.Data.DataException: 37000[POL-5228] syntax error at Oracle.Lite.Data.LiteCommand.Prepare()…
    Thanks

    Jenny,
    Please let us know if you still need this post resolved.
    Thank you.

  • Scheduling report in C# with parameters

    Post Author: lk4772
    CA Forum: .NET
    Hello. I'm going nuts here. I've written a custom web app that will serve as our new InfoView. My dev machine is Windows XP, I'm using Visual Studio 2005, ASP.Net 2.0 and Crystal SDK version XIR2. I have everything working properly with one exception....applying the parameters to the report when it's being scheduled. I have tried several different options that I've found online and in the Help files, but nothing seems to work properly. Absolutely any suggestions would be great! Here's what I've been trying/seeing.... First try - getting parameterFieldInformation from the reportViewer object - but the question here is, if I'm trying to schedule the report, how do I reapply the parameters to the InfoStore object for scheduling?  Second try - getting the parameter information from the InfoObject propertyBag - but when trying to add to the propertyBag the current/new values, it tells me that I can't add the Property "si_value1"    ex: io.ProcessingInfo.Properties&#91;"si_prompts"&#93;.Properties&#91;x + 2&#93;.Properties&#91;"si_current_values"&#93;.Properties.Add("si_value" + (x + 1));         io.ProcessingInfo.Properties&#91;"si_prompts"&#93;.Properties&#91;x + 2&#93;.Properties&#91;"si_current_values"&#93;.Properties&#91;"si_value" + (x + 1)&#93;.Properties.Add("si_max" + (x + 1), pdt.ToValue);         io.ProcessingInfo.Properties&#91;"si_prompts"&#93;.Properties&#91;x + 2&#93;.Properties&#91;"si_current_values"&#93;.Properties&#91;"si_value" + (x + 1)&#93;.Properties.Add("si_min" + (x + 1), pdt.FromValue); Third Try - using the CrystalDecisions.Enterprise.Desktop.Report object to get the ReportParameters, however when trying to set the value of a range parameter, I keep getting the error message "One or more arguments are invalid." - I've tried setting the value to a ReportParameterRangeValue and a ReportParameterValue - both recieve the same error message - code is below and yes the e.FindControl does return the proper value entered by the user    ex: if (parm.ParameterName == "dt")                            {                                rval = parm.CreateRangeValue();                                TextBox txt1 = (TextBox)e.FindControl("txtRange1." + x.ToString());                                rval.FromValue.Value = txt1.Text.ToString();                                TextBox txt2 = (TextBox)e.FindControl("txtRange2." + x.ToString());                                rval.RangeValue.ToValue.Value = txt2.Text.ToString();                                parm.CurrentValues.Add(rval);                                                            }

    Post Author: Argan
    CA Forum: .NET
    Check the C# samples:
    http://support.businessobjects.com/communityCS/FilesAndUpdates/bexi_csharp_samples.zip.asp
    There is a sample called ENTXI_csnet_rpt_ScheduleParameters

  • Invocation report (Discoverer Viewer) with parameters from an application

    Hi everyone,
    I'm proving report in Discoverer Viewer invoking them from an application, which sends parameters to him.
    I cannot obtain, that they directly execute when doing click in the URL of execution with its parameters, but that opens the screen where it requests to enter the parameters, without assigning those that they are arriving to him in the URL.
    I verified if the problem were in the name of the parameters and apparently it takes the values from such by the order in which they arrive.
    Also I verified that the values of parameters are arriving correctly from the application.
    Somebody can help me with this?
    Thank you very much
    Ana

    Hi,
    I could resolve the problem.
    The creation parameters in discoverer reports is case sensitive with the parameters that arrive from an application.
    Anyway, thank you
    Ana

  • Jpa query with parameters in Greek

    Hello
    I use netbeans 6.9.1 and toplinlk essensials for jpa connected to a mysql database
    mysql database constants:
    character_set_database = utf8
    character_set_server = utf8
    character_set_system = utf8
    I have this code
    Query qItemom = emOpsw.createQuery("SELECT m FROM Itemom m WHERE "
    + " m.book = :book AND m.omfile = :omfile AND m.omaster = :omaster ");
    qItemom.setParameter("book", (short)1);
    qItemom.setParameter("omfile", (byte)2);
    qItemom.setParameter("omaster", "ΕΚΡ");
    The "omaster" parameter is a String. When i pass latin characters i get results, but when i pass
    a greek character string "ΕΚΡ" for example, i do not get any results at all.
    Can anyone help me?
    Than you in advance.

    Could be a MySQL or JDBC issue. Try the same query using raw JDBC and the bind parameter.
    You could also try disabling parameter binding, if the issue has to do with your JDBC driver's binding.
    James : htttp://www.eclipselink.org

  • FRM-41214 unable to run report from forms with parameters

    Hi all,
    I am unable to run a report from forms if I pass parameters. Report is running fine in reports builder and in url if I access the report straightly.
    I used set_report_object_property to pass the parameters.
    Any clues to solve this problem?
    Priya

    Hi Jeneesh,
    Code is below:
    myreport1 :=find_report_object('MYREP');
    reportdata := Get_Parameter_List('reportsdata');
    IF NOT Id_Null(reportdata) THEN
    Destroy_Parameter_List( reportdata );
    END IF;
    reportdata := Create_Parameter_List('reportsdata');
    Add_Parameter(reportdata, 'account_number', TEXT_PARAMETER, :parameter.account_number);
         /* Setting the properties into Report Object */
         SET_REPORT_OBJECT_PROPERTY(myreport1, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(myreport1, REPORT_DESTYPE, CACHE);
         SET_REPORT_OBJECT_PROPERTY(myreport1, REPORT_DESFORMAT, 'htmlcss');
         SET_REPORT_OBJECT_PROPERTY(myreport1, REPORT_SERVER,vc_reportserver);
                   SET_REPORT_OBJECT_PROPERTY(myreport1, REPORT_FILENAME, 'C:\priya\forms\EmcySummary.jsp');
              SET_REPORT_OBJECT_PROPERTY(myreport1,REPORT_OTHER,'account_number='|| :parameter.account_number);
         /* Value of v_rep identifies the report that is currently running either locally or on a remote report server */
         vrep := RUN_REPORT_OBJECT(myreport1,reportdata);
    /* Checking for Report Server is started or not, if not throw an exception else proceed */
         if vrep = vrep||'_0'then
         raise form_trigger_failure;
    end if;
         vjob_id := substr(vrep,length(vc_reportserver)+2,length(vrep));
         vrep_status := REPORT_OBJECT_STATUS(vrep);
         /* Checking the status of the report */
         WHILE vrep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    vrep_status := report_object_status(vrep);
    END LOOP;
    /* When the report status is successful then report is generated in Web */
         IF vrep_status = 'FINISHED' THEN
         --     COPY_REPORT_OBJECT_OUTPUT(vrep,v_tempstorage);
              WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||vjob_id||'?server='||vc_reportserver, '_blank');
         END IF;
    ---Any clues?

  • Query with parameters

    SELECT
    A.DocEntry, A.DocNum, A.Series, A.PostDate, A.DueDate,
    A.ItemCode AS Parent,A.PlannedQty, A.CmpltQty, A.RjctQty,
    B.ItemCode AS CHLD, B.BaseQTY, B.PlannedQTY,B.IssuedQTY,
    A.CmpltQtyB.BaseQTY AS Compl_QTY, A.RjctQtyB.BaseQTY AS Rej_QTY,
    C.LastPurPrc as PurPrise, C.LstEvlPric as EvlPrice,
    D.LineTotal,
    B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)) As WIP_QTY,
    (B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)))* C.LstEvlPric As WIP_Valuation,
    A.Comments
    FROM
    OWOR A INNER JOIN WOR1 B ON A.DocEntry = B.DocEntry
           INNER JOIN OITM C ON B.ItemCode = C.ItemCode
           JOIN IGE1 D ON B.DocEntry=D.BaseRef AND D.BaseLine =B.LineNum
    WHERE A.Status='R'
    AND  A.PostDate BETWEEN
    (CASE WHEN '\[%0]' = ' ' THEN '1/1/2007' else '\[%0]' END)
    and
    (CASE WHEN '\[%1]' = '' THEN '1/12/2050' else '\[%1]' END)
    The above query does not accept parameter for the table OWOR A.It gives error for the parameter A.PostDate as,
    Query sentence was not completed.
    Parameters are being accepted for the other tables.
    Edited by: Dilip Kumbhar on Feb 12, 2008 12:07 PM

    If you run the query direct in sql management studio or query analyzer, gives it the same error?
    I think, that the problem is somewhere in SBO, because i found out, that sap is modifiing the queries inside.
    Try to rename one plannedqty in select statement as plan1 - maybe two same names in select are doing this problems. Or to prevent the sap modifiing, try it as select from select as
    select
    DocEntry, DocNum, Series, PostDate, DueDate,
    Parent,Plan1, CmpltQty, RjctQty,
    CHLD, BaseQTY, PlannedQTY,IssuedQTY,
    Compl_QTY,  Rej_QTY,
    PurPrise,  EvlPrice,
    LineTotal,
    WIP_QTY,
    WIP_Valuation,
    Comments
    from
    SELECT
    A.DocEntry, A.DocNum, A.Series, A.PostDate, A.DueDate,
    A.ItemCode AS Parent,A.PlannedQty as Plan1, A.CmpltQty, A.RjctQty,
    B.ItemCode AS CHLD, B.BaseQTY, B.PlannedQTY,B.IssuedQTY,
    A.CmpltQtyB.BaseQTY AS Compl_QTY, A.RjctQtyB.BaseQTY AS Rej_QTY,
    C.LastPurPrc as PurPrise, C.LstEvlPric as EvlPrice,
    D.LineTotal,
    B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)) As WIP_QTY,
    (B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)))* C.LstEvlPric As WIP_Valuation,
    A.Comments
    FROM
    OWOR A INNER JOIN WOR1 B ON A.DocEntry = B.DocEntry
    INNER JOIN OITM C ON B.ItemCode = C.ItemCode
    JOIN IGE1 D ON B.DocEntry=D.BaseRef AND D.BaseLine =B.LineNum
    WHERE A.Status='R'
    ) T
    hope it helps you

  • SQL query with "parameters"

    Hi,
    I want a sql query as follows (but it seems not be as simple as that...)
    select A1, A2,
    select sum(B3)
    from B1 = A2
    where
    from A
    where A1 = '1001'
    is it possible, in some way, to have A2 from outer select statement as a parameter to inner select statement?

    Hi,
    user8819407 wrote:
    Hi,
    I want a sql query as follows (but it seems not be as simple as that...)
    select A1, A2,
    select sum(B3)
    from B1 = A2
    where
    from A
    where A1 = '1001'
    is it possible, in some way, to have A2 from outer select statement as a parameter to inner select statement?Yes, you can reference columns from a parent query within its child query.
    For example:
    select  A1, A2,
             select  sum (b.B3)
             from   b
             where  b.B1 = a.A2
    from     A
    where     A1 = '1001'
    ;Within the sub-query, you don't have to qualify columns from b; that is, b3 is assumed to mean b.b3. If the column name is unique, you don't have to qualify columns from table a, either. That is, if b does not have a column called a2, then a2 in the sub-query could only mean a.a2, and Oracle doesn't make you spell out which table a2 comes from, but it makes the code a lot easier to understand and debug if you do qualify the columns.
    By the way, a sub-query that references its parent query like this is called a Correlated Sub-Query .
    "Parameter" doesn't really apply to this situation.

Maybe you are looking for

  • Sales Invoice, Purchase Invoice Merge

    Hi Guys I am creating a report that will give me the total # of Sales and Purchase Invoice, purpose of report is to merge the sales and purchase analysis. i have added all the fields on the main report from the OINV table, i then created a sub report

  • Unable to install a software driver for Canon film scanner on mac OSX 10.6

    I am unable to install a software driver for a Canon film scanner FS4000US. I have downloaded it from Canon then open the package click the install and it asks for a location namely the Applications folder. Then it says it has been installed re -star

  • FCP 2 upgrade causes Crash

    I have many videos created in the older version of FCP and now, since I have upgraded to FCP 2- it crashes every time I open a previously made project and do anything to it. I used it the day I installed it, and it worked fine, but since adding FCP 2

  • Smart Album to isolate iPhone Photos only?

    I have had each version of the iPhone since it's initial release several years back. I want to know if it's possible to create a smart album to group just my iPhone photos (not movies), regardless of which version of the iPhone shot the image. Is thi

  • Générer des UV avec Photoshop CC

    Bonsoir, J'apprend à utiliser le module 3D de Photoshop et je bloque sur le menu Générer des UV. Je sélectionne les options que je veux parmi celles présentées dans la fenêtre, mais je ne sais pas comment je peux ouvrir l'UV une fois générée par Phot