Passing Parameter from Main report to SQL command-based subreport

I am trying to cut down the run time of my reports and have recently figured out how to write SQL commands to limit the data by filtering prior to being pulled into the reports.  However, many of my reports rely on multiple sub reports, which can cause a dramatic 'drag' on the report.
I am trying to filter the SQL command used in my sub report by passing the group parameter, which is selected by the user in the main report, to the sub report's SQL command.  Without this parameter, the sub report has to sort through a lot more data than it would with this parameter, making the run time extremely slow.
Any suggestions on how I can accomplish this?
Thanks for any help you can provide,
Marlene Allen
Crystal Reports Developer
Crystal Reports Professional;
Product Type: Full;
Product Version 11.5

Hi Marlene,
I don't believe you can pass a CR parameter to a Command object.
I suggest replacing all of the Command Objects with a Stored Procedure so all of the data filtering is done server side. DB servers are much more proficient at collecting the data and filtering than CR will ever be. It will also allow you to replace subreports to also speed up your report processing. All depends on your layout of course but something to look at.
Thank you
Don

Similar Messages

  • Pass parameter from main report to sub report?

    Post Author: nomore
    CA Forum: General
    I have a report which is comparing turnover from present year to previous year.Im trying to make it dynamic - so i have added a parameter to the main report to allow user to enter a year, however I cannot work out how to pass this to the sub report so select records based on this. I have passed the data thruogh a fomula ok (WhilePrintingRecords; Shared NumberVar shYear;)  and that is working spot on.Now i just need to enter that number as a record select paremeter. Also if I try to perform a summary on this field (it never changes, but its just a test) - the 'Insert Summary' option is unavailable, and it doesnt show up as a formula in formula editor.  

    Post Author: V361
    CA Forum: General
    I have CR XI, you want to edit your subreport links, right click the sub, select Change subreport links, you should be able to select your field, and see your parameter listed.  Once you set up the link the sub will run based on whatever link you picked.

  • Passing values from main report to sub-reports

    - How do we pass values from main report to sub-report?

    Look at this link which shows how to pass values from a subreport to a main report.
    http://www.datamanagementgroup.com/resources/trainerstalk/trainerstalk_howto_share_subreport_data_with_main_report.asp
    You can use the same method to pass values from main report to a subreport.
    1) Create a formula @mainFormula in the main report, as given in item 1 of link.
    2) Place this formulla in a suppressed report footer section above the target subreport.
    3) In the subreport, create a formula @subFormula that declares the same variable name, as given in item 3 of link.
    4) Place @subFormula column in the subreport where you want to display it.

  • Passing parameter from WEBI report to xcelsius

    hi
    i transfered the parameter from WEBI report (3.1 sp2) table using a link to a gauhe from xcelsius
    i can see the parameter the right number in the gauge value but the problem is that the pin does not move

    How are you connecting your report to Xcelsius? Live Office or QAAWS?

  • How to pass an integer parameter from main report to subreport?

    I don't understand why this isn't working, but I have a main report with parameters:
    StartDate=datetime,
    EndDate=datetime,
    Program=text,
    ChartType=text.
    In this RDL, I have a chart with Action configured on this bar chart series.  The Action expression is:
    ="javascript:void(window.open('http://evolvssrs/ReportServer/Pages/ReportViewer.aspx?%2fIncoming%2fCensus+Report+Modifier&rs:Command=Render&rc:Parameters=true&StartDate=" & Parameters!StartDate.Value & "&EndDate=" & Parameters!EndDate.Value & "&Program=" & Fields!program_info.Value & "&ChartType=" & Fields!ChartType.Value & "','_blank'))"
    (program_info is a FIELD uniqueidentifier value matching the value of the Program parameter).
    So for this subreport, I have tried ChartType parameter as both integer and text, but each time i click on a bar from the main report, it opens a new window with ChartType field empty.  But the other 3 parameters: Start Date, End Date, and Program are
    all populated.  Why is it doing this and how can I fix please?
    Ryan D

    Hi Ryan,
    If I understand correctly, you have got empty in the ChartType parameter text box when you enable go to URL action.
    In my test, if the value we pass to the subreport which is not include in the parameter available values, we would get the empty text box. Please check if it has the specific ChartType values in the subreport parameter available values.
    Alternatively, please check if it has pass value to the subreport. We can add a parameter without available values and default values to check if it is can accept the Field ChartType Value from the main report.
    Hope this helps.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Pass data from Main report to Subreport

    I have client name in Main Report. I need to display the same name into Subreport. How can I pass the value from MainReport to SubReport.

    Hi Mahendra,
    Drag the subreport control from toolbox,
    Go to the subreport properties by right click on the subreport.
    In General property add the child report.
    In parameter property , add parameter,in Name dropdown will show the parameters already created in the child report.
    In Value column which is fron of Name, you can give values which are avilable in Main report.
    You can see below screen for better understanding.
    Thanks
    Prasad

  • Passing parameter from interactive report column link to new page

    I'm very simply trying to pass the value of the column link to the where clause on the next page.
    Interactive Report on P2 has column link fid alias in sql query.
    I read somewhere to refer prefix the interactive report column with IR ??
    So I have item name P2_FID, value #FID#. Anyway, I've tried a kazillion things.
    Created a hidden item with same source value... sigh.
    Is there a syntax to refer to a report column link, rather than an item_id in a region where clause?
    Is there a simple direct way to do this?
    Thanks,
    Pamela
    -----pls/apex/f?p=163:1:2746459963336955::NO::P2_FID:119

    Thank you Varad...
    Unfortunately, I am still getting no data found. (and there IS data).
    a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
    b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
    Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
    3) Where Fishery_id = :IR_P2_FID
    Where Fishery_id = &IR_P2_FID
    Thanks again!
    Pamela

  • Pass Parameter to IN Operator in SQL Command in OLEDB source

    Hi,
    I am trying to pass multiple values as one parameter. Eg: I need to get the employess with gender in ('M','F')
    query: select eno, ename, sal, gender from emp where gender in (?)
    Created a variable 'varGender' with the value - 'M','F'
    And passed the parameter mapping in OLEDB Source. But this is not returning any records.
    Please advise.
    Thanks.

    Hi Vaibhav,
    Thanks for your kind reply.
    I need to pass the same where condition to multiple source queries and we don't want to repeat the same condition in all queries and replace with a variable. Also the query is too big to keep it in the Variable. Please help me.
    Thanks
    Put the required filter values in a staging table and then use it in a join condition with all the other tables in all the other tasks.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to pass parameter from xcelsius report to WebI report

    Hi,
    I have a pie chart in xcelsius. When user clicks on one of the slices of the chart I want to pass the selected slice value to a WebI report.
    For this I am doing following steps
    1. When user clicks on a chart slice the selected slice value will be written into a cell say B1
    2. Create a URL button which will get triggered on change of the value of cell B1.
    3. Set the URL value in the cell say C2. Here I am using Opendoc function to open Webi report.
    If I enter following value in C2 and run the report it works fine and opens the desired webi report.
    ="http://myServer.xyz.com:9001/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sType=wid&sDocName=MyDoc&sReportName=MyReport&sWindow=Same&sRefresh=Y&lsSCompany=MyCompany&lsSDecision="  &$B$1
    here I am Passing two parameters Company and Decision.
    Now I want to make this report run in all the environment so I changed the actual path of server( myServer.xyz.com:9001) to following
    ="../../opendoc/openDocument.jsp?sType=wid&sDocName=MyDoc&sReportName=MyReport&sWindow=Same&sRefresh=Y&lsSCompany=MyCompany&lsSDecision="  &$B$1
    but if I do this it gives me following error in Webi:
    "Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address."
    Is there any other way to open the WebI report from xcelsius?

    Hi Peter,
    the link provided refers to Xcelsius V4.5.
    In Xcelsius 2008 you have to control Flash Vars in the Data Manager.
    Go to the Data Manager, Add the Flash-Var Connection Type, Select CSV-FlashVar and define a name and a range.
    But i am not sure if Xcelsius Engage can handle FlashVars, because i am only working with Enterprise.
    Please take a look at your manual.
    For sure there are other ways to import data during runtime. Take a Look at the Connections provided by Data Manager. (e.g. QaaWS, SSRS, LiveOffice, Webservices, ...)
    Also take a look at the link below. It might be another nice option for "pseudo" data connectivity
    http://labs.businessobjects.com/xcelsiuspublishing/default.asp
    Best Regards
    Ulrich

  • Pass Parameter from main page to include page (subview) and read it ?

    Hello All
    i have an include header.jsp page in main page.jsp ,and i included it by subview.
    i want to pass a parameter ex(screen name) to the subview by using f:param.
    Here is the code in main.jsp:
    <f:subview id="headerSubView">
    <jsp:include page="/commons/header.jsp" flush="true">
    <jsp:param name="screenTitleByJspParam" value="screen2007"/>
    </jsp:include>
    <f:param name="screenTitleByFparam" value="screen2007"/></f:subview>
    Code in header.jsp
    1- <af:outputFormatted value="#{param.screenTitleByJspParam}"/> -- this dose not work
    2- <af:outputFormatted value="#{param.screenTitleByFparam}"/> -- this dose not work (i want this manner)
    So how i can send parameter by ]<f:param and read it by subview uesing adf/jsf tags ?
    Regards
    Mohd.Weshah
    weshah79

    Dear thanassis
    Thanks for you help ,your code is working successfully but my case is the following :
    same your main jsp page but the subview tag in table :
    <%@ page contentType="text/html;charset=windows-1256"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1256"/>
    <title>main</title>
    </head>
    <body>
    <h:form>
    <afh:tableLayout>
    <afh:rowLayout>
    <afh:cellFormat>
    <f:subview id="header">
    <jsp:include page="header.jsp" flush="true">
    <jsp:param name="pageTitle" value="Modify aa record"/>
    </jsp:include>
    <f:subview>
    </afh:cellFormat>
    </afh:rowLayout>
    </afh:tableLayout> </h:form>
    </body>
    </html>
    </f:view>
    try it the parameter dose not work ,but if you want that code work successfully move the subview out of the table.
    Do you know what is the problem ?
    i want give you another hint maybe it is realted to the same problem, which is in my original page the body tag is adf tag ie(<afh:body>) your code dose not work with that tag until i changed the afh:body to html body.
    Regards
    Mohd.Weshah

  • How to pass parameter from 1 stored procedure to another stored procedure inside crystal report

    Hi
    I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
    I have 3 stored procedure
    The 1st one is used to gather information and process the calculation
    another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
    After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
    Thanks in advance
    Chi

    Hi Chi
    To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
    After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
    Regards
    Poonam Thorat.

  • Problem while passing parameter from report to report.

    Hi
    I'm using forms and reports 10g, hava a problem while passing the parameter from reports to report.
    i'm using srw.set_hyperlink to call report from report.
    i have created a key value in the cgicmd.dat file called
    faccre802005-2006: report=faccre80 destype=cache desformat=pdf userid=<userid/passwd@cs> server=<servername>
    Now in the format trigger i'm using this key value
    function BTN_DEBITFormatTrigger return boolean is
    temp varchar2(5000);
    IP_ADDRESS VARCHAR2(50);
    SERVER_NAME VARCHAR2(10);
    L_ACCT_CODE VARCHAR2(14);
    begin
    SELECT MAST_INT_DESC,MAST_USER_PGM_ID INTO IP_ADDRESS,SERVER_NAME FROM MAST_INT_INFO WHERE MAST_INT_ID='VISHWA';
    temp := IP_ADDRESS||'?faccre80'||:P_FIN_YEAR||'+server='||server_name;
    temp :=temp ||'+'||'P_PREVIOUS_CODE='''||:ACCT_CODE||''''||'+'||'P_COMPANY_CODE='''||:P_COMPANY_CODE||'''';
    temp :=temp ||'+'|| 'P_FROM_DATE='''||TO_CHAR(:P_FROM_DATE,'DD-MON-RRRR')||''''||'+'|| 'P_TO_DATE='''||TO_CHAR(:P_TO_DATE,'DD-MON-RRRR')||''''||'+'||'P_TRUST_CODE='''|| :P_TRUST_CODE||'''';
    temp :=temp ||'+'|| 'P_UNIT_CODE='''||:P_UNIT_CODE||''''||'+'||' P_FIN_YEAR='''||:P_FIN_YEAR||'''';
    temp :=temp ||'+'|| 'P_LEVEL='''||:P_LEVEL||''''||'+'||'P_HEADER='''||replace(:P_HEADER,' ','%20')||''''||'+'||'P_FORMAT='''||:P_FORMAT||'''';
    SRW.Set_Hyperlink(temp);
    END;
    return (TRUE);
    end;
    Report is coming but not the expected result because parmaeters are not coming from first report to second report.
    If i dont use cgicmd file userid and password are displyed in the URL.
    Pl tell me how to pass parameter from one report to another.
    thanks and regards

    Hi
    I got the solution.
    I forgot to add %* at end of the KEY value.

  • How to use the region parameter of main report for subreport chart titles?

    I am using Crystal Reports 11.
    I create 1 main report with 10 sub-reports that contain cross-tabs & charts. The main report has a parameter regarding 3 different areas: region1, region2, and region3.
    I use the method of adding the u2018regionu2019 parameter of main report to the selection formula of the sub-reports. So, I can select 'region' from main report to controll outputs in sub-reports by region.
    I use formulas for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    Since I pass the u2018regionu2019 parameter of main report to sub-reports, I have to change chart titles dynamically based on the region I select.
    How can I use the region parameter from main report in the formulas to get chart titles dynamically?
    Thank you in advance.

    Thank you.
    I am not using Chart Title with "Chart Expert".
    I am using a formula for chart titles, e.g.:
    Select {Product Code}
    Case 'a111':
      u2018Region1 u2013 a111 Counts'
    Case u2018b222u2019:
      u2018Region1 u2013 b222 Counts'
    u2026
    u2026
    Default:
    u2026
    I drag this formula above the charts and it looks like a dynamic title. So, for product a111, the chart title would be "Region1 u2013 a111 Counts"; for product b222, the chart title would be "Region1 u2013 b222" Counts; and so on ...
    Because I pass the region parameter from master report to subreport, I want to change the region part of the chart titles dynamically.
    For example,
    when select Region1, the chart titles should be: "Region1 u2013 a111 Counts"; "Region1 u2013 b222"; ...
    when select Region2, the chart titles should be: "Region2 u2013 a111 Counts"; "Region2 u2013 b222"; ...
    I want to add the region parameter into the tiltle formula.
    How should I do?

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • Pass parameter to ssrs report in performance point webpart from textbox text

    How to pass parameter to ssrs report  in performance point webpart from textbox text
    Please help me to solve this ...
    Bikky Kumar

    Edit your SharePoint page and add new text filter web part.
    Then pass the text filter value to your performance point report using connections. Your report should include at least one parameter to get the value. More over you can set default value in text filter.

Maybe you are looking for

  • Copy button not working properly in service contract - crmd_order tcode

    Hi experts, I want to create a duplicate row in contract through Duplicate Button Supplied by SAP. As I understand the function of the duplicate row button is to copy the same set of information in next row with auto incremental or manual. As far as

  • Error in E-mail Adapter - Message protocol XIALL

    Hi, when I set a message protocol XIPAYLOAD ... everything is OK when I set a message protocol XIALL an error message : "error occured: exception caught during processing mail message; java.net.ConnectException: Connection refused: connect" is raised

  • How to Search for Collab Documents from Specific Collab Projects

    I am looking for some sample code that will use the portal Remote Search API to query for documents in Collaboration Server Only. I have a specific group of projects that I need to query. I can gather these in an Array --> IProjects[]. The Collaborat

  • Tabbar tab mouseover or click events..newbie

    I am trying to create a tab menu bar that opens a submenu with a mouseover event over each tab. I can't seem to get the tabbar children events to do anything. I can get click events to do things by reading the index property with a script and import

  • Timeline in Flex?

    I'm looking to develop a component that takes in xml data listing events and times (things like advance slide at 8 seconds, or display a custom polling component to the user at 52 seconds), and broadcasts events based on the data. I see cuepoints dis