Passing values in Subreport

Hi,
In GH1: i have one subreport
In GH2: i have two or three subreport
My question is, i have to pass the GH2 sureport values to GH1 Report Header. can any one explain?

by using shared formulas.
These are my personal crib notes and formula names to remind me how to do it:
Shared variable formulas for subreport/main report,
must use same <var name> in each shared formula variable declaraions. 
also use the same <var name> in naming shared formulas & in related running
total formula names and declared variables to mentally link them together.
Shared formulas work in either direction.  Order of appearence on report controls
primary/secondary. To go from subreport to main report, @mainform.<shared var> 
must appear after the subreport in the main report.
subreport shared formula - primary; must "print" in subreport-can be white text
and/or off the 'page' but do not suppress
1. {@subform.field1} <<<sample formula
////{@subform.<var name>}   stores the figure to be shared with main report.
whileprintingrecords;
Shared numberVar <var name> := <source field or formula name>;
main report shared formula - secondary. must "print" in main report after subreport;
can be white text and/or off the 'page', but do not suppress; use same <var name>
as subreport formula
2. {@mainform.field1} <<<sample formula
//{@mainform.var name>} retrieves {@subform.<var name>}
whileprintingrecords;
shared numberVar <var name> ;
<var name>
You could then share the formula to the next subreport by putting the shared formula
{@subform.field1} in the next subreport.

Similar Messages

  • Passing values to subreport in SSRS throwing an error - Data Retrieval failed for the report, please check the log for more details.

    Hi,
    I have the subreport calling from the main report. The subreport is based on MDX query agianst the SSAS cube. some dimensions in cube has values 0 and 1.
    when I try to pass '0' to the sub report as the parameter value, it gives an error "Data Retrieval failed for the report, please check the log for more details".
    Actually I am using table for storing these parameter values. In the main report I am calling this table (dataset) and passing these values to subreport.
    so I have given like [0],[1] and this works fine. when I give only either [0] or [1] then it is throwing an error.
    Could you please advise on this.
    Appreciate all and any help.
    Thanks,
    Divya

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Passing values to subreport that has many records?

    I have a report with a subreport in it and that subreport is a bill that includes things like name, address, etc. My report will run the subreport many times for each bill that comes up.
    I am needing to pass values to text objects in these individual subreports that is information that is obtained in the code. My code works fine when this subreport is ran on it's own but I'm having trouble figuring out how to change the code up to put the information into individual subreports. Here is a simple example of some of my code:
    using (PrintBills reportPrintBills = new PrintBills())
        using (CrystalReportBill reportBill = new CrystalReportBill())
            CrystalDecisions.CrystalReports.Engine.TextObject lblBalanceDue = ((CrystalDecisions.CrystalReports.Engine.TextObject)reportBill.Summary.ReportObjects["lblBalanceDue"]);
            CrystalDecisions.CrystalReports.Engine.TextObject lblName = ((CrystalDecisions.CrystalReports.Engine.TextObject)reportBill.Summary.ReportObjects["lblName"]);
            DataSet ds = new DataSet();
            GetBills(ref ds, "Bills", date);
            DataView dvID = new DataView(ds.Tables["Bills"]);
            num = 0;
            foreach (DataRowView rowID in dvID)
                GetBioInfo(ref ds, "BioData", id);
                DataRow row = ds.Tables["BioData"].Rows[num];
                lblName.Text = row["Stu_Name"].ToString();
                lblBalanceDue.Text = String.Format("{0:C}", row["Amount_Due"]);
                num++;
        reportPrintBills.SetParameterValue("@tblMonth", date);
        reportPrintBills.SetParameterValue("@begdate", strBegdate);
        reportPrintBills.SetParameterValue("@enddate", strEnddate);
        //Export to PDF code here
    reportBill does not display the values obviously. Somehow I need to set that reportBill is a subreport of reportPrintBills in the code so that each record will recognize the TextObject values that I am sending to them.
    Another solution I've tried is adding parameter fields to reportBill and reportPrintBills and linking them up and then passing values like so:
    foreach (DataRowView rowCWID in dvCWID)
        GetBioInfo(ref ds, "BioData", id);
        DataRow row = ds.Tables["BioData"].Rows[num];
        name = row["Stu_Name"].ToString();
        amtDue = String.Format("{0:C}", row["Amount_Due"]);
        reportPrintBills.SetParameterValue("@strName", name);
        reportPrintBills.SetParameterValue("@strAmtDue", amtDue);
        num++;
    But the value stays the same in all of the subreports rather than changing with each pass through.

    Open the report up in the Designer and Click on Edit, Subreport Links. Likely what you can do is use Shared Variables to pass values from the main report to the subreport.
    You need to do this in the report first. If you are using RAS then you can at runtime. If RAS is not available to you then no way in code.
    See these samples:
    Root Page
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessIntelligence%28BusinessObjects%29+Home
    Enterprise Samples (including managed and unmanaged ras)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications
    Non-Enterprise Samples
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Exporting Samples (RAS)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Also refer to the DSK help files for the Engine or RAS and search on the subreportcontroller.
    If you are using RAS I'll move your post to the SDK forum.
    Thank you
    Don

  • Crystal Reports 10, Want to pass values from subreports to main report

    Post Author: playmkr278
    CA Forum: General
    Is there a way to just share values out of subreports.
    The reason I ask is that I am having problems pulling the correct information in one subreport so I'd like to use 2 subreports to pull out Billable hours on one and Billed Hours on another and then add them together to display on the main report.

    Post Author: Jedit
    CA Forum: General
    Yep there is!
    In your sub report
    I the formula editor create a shared variable then create the same variable in your main report.
    EG
    IN your SUB
    Create new formular called tothrs etcu2026..
    whileprinting records;
    shared numbervar tothrs: sum({table.fieldname}&#93;
    In Your Main Report
    whileprinting records;
    shared numbervar tothrs
    this passes the value from your sub to the main, check help for different types of format as the one above is only for a number there are others for time & date etc..
    hope this helps!
    I have been doing a similar exercise myself but got stuck summing the parameter values in my main report, if you solve this let me know?
    Please see http://technicalsupport.businessobjects.com/cs/forums/thread/6210.aspx

  • Passing values from subreport to main report

    Dear All,
           I have used shared values in my sub report and i want to use that shared variable in my main report in one of the formulas for average calculation but i see the values as 0.
    Can someone let me know what I am missing.
    Regards,
    Sonali

    Hi
    The most important thing to remember when using shared variables is that Crystal Reports must first evaluate the formula where the value is stored before evaluating the formula that retrieves the shared variable.
    For example if you want to pass a grand total from the subreport to do a calculation in the main report, follow these steps:
    1. In the subreport, create a formula similar to the one below:
    //@SubFormula
    //Stores the grand total of the
    //{Orders.Order Amount} field
    //in a currency variable called 'myTotal'
    WhilePrintingRecords;
    Shared CurrencyVar myTotal := Sum ({Orders.Order Amount})
    2. Place this formula in your subreport.
    3. In the main report, create a formula that declares the same variable name:
    //@MainFormula
    //Returns the value that was stored
    //in the shared currency variable called
    //myTotal in the subreport
    WhilePrintingRecords;
    Shared CurrencyVar myTotal;
    myTotal
    4. Place @MainFormula in a main report section that is beneath the section containing the subreport.
    NOTE:
    For the shared variable to return the correct value in the main report, you must place @MainFormula in a main report section that is beneath the section containing the subreport. This ensures Crystal Reports evaluates the @SubFormula before @MainFormula.
    One way to do this is to insert a section below the section containing the subreport, and place @MainFormula in this new sub-section:
    · On the 'Format' menu, click 'Section'.
    · On the 'Sections' list, click the section containing the subreport.
    · Click 'Insert' (at top of dialog box). This inserts an additional subsection.
    · Click 'OK' to return to the report, and insert @MainFormula into this new sub-section.
    The next time you preview the report, @MainFormula displays the value from the subreport. In this particular example, that value was the grand total of the {Orders.Order Amount} field.
    5. Once you have verified that @MainFormula is returning the correct value from the subreport, you can include this formula in other main report formulas, such as:
    //@NewFormula
    //includes data from subreport
    {@MainFormula} + Sum ({Customer.Last Year's Sales})
    · Place this formula in the same section as @MainFormula, or in a section further down on the report.
    You have now successfully shared data from a subreport with the main report.
    NOTE:
    This is not possible with On Demand Subreports in Crystal Reports since the report will not be processed until after clicking report.
    Regards
    Sourashree

  • Passing the values from subreport to master report in JasperReports

    Hi All,
    I want to pass the values from subreport to master report, but my subreport is without any query.
    Please help me in this regard. its urgent.
    Thanks & Regards
    Kris

    Hi,
    Below link may help you
    http://jasperreports.sourceforge.net/tips.tricks.html#returnvalues
    regards
    MJ

  • Passing value to internal parameter of subreport

    I have a report which contains a subreport. That subreport has 2 regular parameters and 1 internal parameter (which has default value).
    From what I've read ( http://msdn.microsoft.com/en-us/library/aa337490(v=sql.90).aspx ) I understand that there's no need to pass a value from the parent report to the subreport
    for internal parameters.
    All runs fine in VS (2005) and also fine after deploying to SSRS 2005. But when I deploy to SSRS 2008R2, I get "error subreport could not be shown" for that subreport.
    If I do pass that internal report (it DOES show in the chooslist from the parent report) then I get error "error subreport could not be shown" both in VS and in the reporting site. So I can't find any way to display it in SSRS 2008.
    Your advice appreciated.
    Namnami

    The report doesn't know whether it is a report or subreport. In either case, it takes the input and generates an output using the same settings and formulae. If you get a different output when it is run as a subreport, it is because the input is different.
    So I suggest that you display each parameter value of your subreport (or at least those that are passed in by your main report) in a set of text boxes added to the top of the report. Run the report by itself in SSRS 2008 and record the values
    that the report is consuming. Now in the main report, do the same. Display the value of each parameter that you are passing to the subreport in a text box. Look for differences. Remember to display multivalue parameter values in a text box, you will need
    to convert them to a string using Join: =Join(Parameters!Multi.Value,",").

  • Issue passing values to text symbols in Dynamic text PDF forms

    Hello Everyone,
    I am facing a problem related to Dynamic texts in Adobe PDF forms (Text node of type include text). I am able to pass the dynamic values to the Text node properties but i am not able to pass the values to Text symbols inside the Text node. When tested it says the field not found. I have the same structure and field in the CONTEXT as that of the text symbol. The problem i see is because in PDF the field names have $record.(fieldname) ?
    Please share your thoughts if anyone has faced similar problem or know how to handle it.
    Thanks a million in advance,
    Chandu

    Open the report up in the Designer and Click on Edit, Subreport Links. Likely what you can do is use Shared Variables to pass values from the main report to the subreport.
    You need to do this in the report first. If you are using RAS then you can at runtime. If RAS is not available to you then no way in code.
    See these samples:
    Root Page
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessIntelligence%28BusinessObjects%29+Home
    Enterprise Samples (including managed and unmanaged ras)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications
    Non-Enterprise Samples
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Exporting Samples (RAS)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Also refer to the DSK help files for the Engine or RAS and search on the subreportcontroller.
    If you are using RAS I'll move your post to the SDK forum.
    Thank you
    Don

  • Passing values to swc in flex

    Hi,
    I got flash .swc file with a symbol converted to flex component. I imported this .swc in flex library path, and I put it on stage like a class:
    var mySwc:swcFile = new swcFile;
    Inside this .swc I got some Actionscript code. I would like to pass a value to the Actionscript inside the swc to change one of its variables dynamically.
    mySwc.myVariable = x;
    But problem is that AS in .swf is processed when constructor is called and before I set myVariable=x. So myVariable is used within this .swf AS with a default value istead of 'x' value.
    Is there any way to pass this argument to the .swc AS before executing it?

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Passing Values to BADI in LUW

    We have a process in SRM where incoming IDOCS are coming in from an external source. In our Z function module the BBP_DOC_CHANGE_BADI is called and we need to pass a value to DOC_CHANGE_BADI to make sure we process only code for this process.
    Options:
    1) EXPORT/IMPORT To Memory ID - Did not work
    2) EXPORT/IMPORT TO INDX - Did not work, we processed 10 idocs at once and memory got lost during 1 update.
    3) Write to Z table in Z FM, and then read table in BADI. Current solution.
    4) Tried to use field symbols  (FM(field1) didnt work.
    Any other ideas?

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • 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.

  • Background Job pass value

    Hi, I am calling a Background job in my program. I am using JOB_OPEN, JOB_SUBMIT and JOB_CLOSE FM to start a job. My need is to pass a value to the job program(job program doesnt have any selection screen values). Is their any way without creating variants each time to pass value to it.
    Please advice.....

    Hello,
    You can first use  JOB_OPEN which returns job number. Then build ranges or parameters to use SUBMIT to call the program.
    Eg: SUBMIT RM06BB20 AND RETURN
          WITH S_EKGRP IN R_EKGRP
          WITH S_EKORG IN R_EKORG
          WITH S_FLIEF IN R_FLIEF
          WITH S_KONNR IN R_KONNR
          USER sy-uname VIA JOB w_jobname
          NUMBER w_job_number.
    Now use JOB_CLOSE.
    Thanks,
    Venu

  • Passing values between adf application and web services

    hi i have a situation where i have jsff page which got username,surname,lastname,email i what to pass this value to my webservices how can i do that. this is how i create my webservicesright click viewControler->web services->web services Data Control
    i what to pass the value to webservices workflow i already have a screen in my workflow now i what to pass the adf application values to that webservices am in jdeveloper 11.1.1.6.0
    i try this
    <af:inputText simple="true"
                            required="#{bindings.Username.hints.mandatory}"
                            columns="#{bindings.Username.hints.displayWidth}"
                            maximumLength="#{bindings.Username.hints.precision}"
                            shortDesc="#{bindings.Username.hints.tooltip}" id="it1"
                            value="#{bindings.Username.inputValue}">
                <f:validator binding="#{bindings.Username.validator}"/>
                <af:setPropertyListener from="#{bindings.Username.inputValue}"
                                        to="#{bindings.start_user_details}"
                                        type="action"/>
              </af:inputText>

    i make my webservices to pass values
    <af:inputText simple="true"
                            required="#{bindings.Username.hints.mandatory}"
                            columns="#{bindings.Username.hints.displayWidth}"
                            maximumLength="#{bindings.Username.hints.precision}"
                            shortDesc="#{bindings.Username.hints.tooltip}" id="it1"
                            value="#{bindings.Username.inputValue}">
                <f:validator binding="#{bindings.Username.validator}"/>
                <af:setPropertyListener from="#{bindings.Username.inputValue}"
                                        to="#{bindings.approveUser_username}"
                                        type="action"/>
              </af:inputText>
    but am geting error reference approveUser_username not found

  • 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

Maybe you are looking for

  • Anti virus

    I own Bb Curve 8520. Does it come with antivirus installed? Or do I have to install one and if so, please advise. Solved! Go to Solution.

  • RTF not formating correctly

    Hi everyone I imported an RTF document and inlcuded it in my splash screen. I have some lingo that updated the ducumented when the EXE is ran: on beginsprite me      member("Lawyer_bio").fileName = the moviePath & "Lawyer_bio.rtf"      member("Lawyer

  • IPhoto duplicates all my pictures?!!!

    Hi, i found out that after i add a pict to the library and than modify it (via iPhoto), if i spotlight the file name of that picture it finds 3 copies in 3 different folders of the library: one in "originals", one in "data" and one in "modified". is

  • Track only plays a few seconds

    I bought an album from the itunes store. Track 3 stops after some seconds (altough it's longer than 10 min.) and continues with track 4. Can I download track 3 another time?

  • Cannot select iTunes Audio Track 2 / Dolby Digital

    Hello, I have a sound card (from Maplin, CMI-8738) with digital optical output configured to use SPDIF output and connected to a Denon Surround Receiver. The sound card is outputting dolby digital fine, when I play a test Dolby Digital encoded file o