Pass a shared variable from a sub-report into cross-tab

Hello everyone!
I need to pass a calculated value in a shared variable from a sub-report into a croos-tab in the Group footer of the main report. When I place this variable in the group footer I can see the value, when I use this variable in the Cross-tab, it is 0.
In the Sub Report:
whileprintingrecords;
shared numberVar Total_SF;
Total_SF:= calculation.
In the Main report:
whileprintingrecords;
shared numberVar Total_SF;
In the Cross-Tab I am using the above formula from the main report.
Do you guys know what I need to do for this to work?
Thank you,
T.

Hey Tat,
I have learned to avoid passing shared variable from sub reports back to main reports.  You just always seem to run into issues with execution order.
Personally, I try to create a shell report and add sub reports, calculating the values I need in the first sub report and pass the values to subsequent sub reports using shared variables.  I'd recommend thinking about arranging your reports like this during your design time.  It has saved me some headaches.

Similar Messages

  • Is it possible to pass a formula value from a sub-report to a main report

    Hi there,
    Im trying to pass a formula value from a Sub-report back upto into my Main report but the value doesnt seem to be getting passed up. Ive tried it the other way around, that is, passing a value from the main report to the sub-report and that works fine.
    Below is an example of what I am trying to do but it is not working. In my sub-report Ive declared a formula variable as,
    formula name=main_subIntRatePageCount
    Shared NumberVar subIntRatePageCount := TotalPageCount;
    and in the Main report Ive declared the formula variable as,
    formula name=subIntRatePageCount
    Shared NumberVar subIntRatePageCount;
    subIntRatePageCount;
    I want the value assigned to "subIntRatePageCount" in my Sub-Report to be available to my Main report.
    The problem I am trying to solve is that the sub-report is spilling over onto two pages, and I need a way of updating the page display on the main report to reflect this. The page display is of format, "displaying page 1 of  3", but its not taking into account the extra page produced by the sub-report, so it should say "displaying page 1 of 4".

    Also thanks Raghavendra, Asha,
    I've tried adding the "whileprintingrecords" statement but that doesnt seem to make any difference.
    I notice that the subReport is being called from my the GroupFooter section of the main report, and I am trying to reference the variable in the main repot in the Page Footer section. Could it be that the variable hasnt been calculated in the Page Footer by the time I calculate it in sub-Report? I thought Crystal Reports does at least 5 passes over the report evaluating all the formulas before it prints the report?
    The problem Im trying to solve is I need to know how many pages my report will have before its completed, so that i can print the statement "displaying page 1 of X", and X is currently not being calculated correctly because the sub-report is printing onto 2 pages and not 1 so the report thinks I have 1 of X pages and not X+1.
    Regards
    Robert.

  • Bring in a shared field from a sub report

    Post Author: Set_Shot_Dave
    CA Forum: General
    Hello All,
    Let me set what I'm doing first.
    I have a running total on my sub-report.
    Second I have a running total on my main report.
    I have to get a percentage of sub-report running total by main report running total.
    I shared the sub-report running total as followed:
    formula name @shared1
    shared numbervar share1;
    share1:= (sub-report running total)
    then I created a formula called Calculation just to see what I get.
    I did the following
    @calculation
    shared numbervar share1;
    numbervar calculation;
    calculation:= share1    this is where I get 0.00.
    But on my sub report  running total I get a 309. (which is correct)

    Post Author: PeterLiebich
    CA Forum: General
    In the formual in the main reqport u need to set the EvaluationTime To WhilePrintingRecords  - the reason that the formula is displaying zero is becuase it is evaluated once per report, (before the sub -report is executed) . This is because there are no databases fields etc.
    ie you formula should be (crsytal syntax)
    WhilePrintingRecords;
    shared numbervar share1;
    share1;
    (Basic Syntax)
    WhilePrintingRecords
    shared  share1 as number
    formula =  share1

  • Get data in a subreport based on a shared variable from the main report.

    Goodd morning,
    My question/problem is how to manage this scenario.
    I am transfering 2 shared variables (pereiod from /period To, ) from the main report to a subreport and now  i would like to get data in this subreport based on these 2 variables...
    The problem is that i can not find the shared one in select expert icon...
    Could anyone point me to solve this issue?
    Thks for any help.
    Jose Marin
    Crystal Report XI SR3

    Hello Jos,
    I recommend to post this query to the [Crystal Reports Design|SAP Crystal Reports; forum.
    This forum is dedicated to topics related to the creation and design of Crystal Report documents. This includes topics such as database connectivity, parameters and parameter prompting, report formulas, record selection formulas, charting, sorting, grouping, totaling, printing, and exporting but also installation and registering.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports Design queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • Issue with passing parameters through Java-JSP in a report with cross tab

    Can anyone tell me, if there's a bug in Java SDK in passing the parameters to a report (rpt file) that has a cross tab in it ?
    I hava report that works perfectly fine
       with ODBC through IDE and also through browser (JSP page)
    (ii)    with JDBC in CR 2011 IDE
    the rpt file has a cross tab and accpts two parameters.
    When I run the JDBC report through JSP the parameters are never considered. The same report works fine when I remove the cross tab and make it a simple report.
    I have posted this to CR SDK forum and have not received any reply. This have become a blocker and because of this our delivery has been postponed. We are left with two choices,
       Re-Write the rpt files not to have cross-tabs - This would take significant effort
    OR
    (ii)  Abandon the crystal solution and try out any other java based solutions available.
    I have given the code here in this forum posting..
    CR 2011 - JDBC Report Issue in passing parameters
    TIA
    DRG
    TIA
    DRG

    Mr.James,
    Thank you for the reply.
    As I stated earlier, we have been using the latest service pack (12) when I generated the log file that is uploaded earlier.
    To confirm this further, I downloaded the complete eclipse bundle from sdn site and reran the rpt files. No change in the behaviour and the bug is reproducible.
    You are right about the parameters, we are using  {?@Direction} is: n(1.0)
    {?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000)) as parameters in JSP and we get 146 records when we directly execute the stored procedure. The date and the direction parameter values stored in design time are different. '1965-01-01' and Direction 1.
    When we run the JSP page, The parameter that is passed through the JSP page, is displayed correctly on the right top of the report view. But the data that is displayed in cross tab is not corresponding to the date and direction parameter. It corresponds to 1965-01-01 and direction 1 which are saved at design time.
    You can test this by modifying the parameter values in the JSP page that I sent earlier. You will see the displayed data will remain same irrespective of the parameter.
    Further to note, Before each trial run, I modify the parameters in JSP page, build them and redeploy so that caching does not affect the end result.
    This behaviour, we observe on all the reports that have cross-tabs. These reports work perfectly fine when rendered through ODBC-ActiveX viewer and the bug is observable only when ran through Java runtime library. We get this bug on view, export and print functionalities as well.
    Additionally we tested the same in
        With CR version 2008 instead of CR 2011.
    (ii)   Different browsers ranging from IE 7 through 9 and FF 7.
    The complete environment and various softwares that we used for this testing are,
    OS      : XP Latest updates as on Oct 2011.
    App Server: GlassFish Version 3 with Java version 1.6 and build 21
    Database server ; SQL Server 2005. SP 3 - Dev Ed.
    JTds JDBC type 4 driver version - 1.2.5  from source forge.
    Eclipse : Helios along with crystal libraries directly downloaded from SDN site.
    I am uploading the log file that is generated when rendering the rpt for view in IE 8
    Regards
    DRG

  • How to pass a bind variable from one SQL Report to Another

    Hello~
    I've created a link on one SQL Report page (Page 1). I would like a value from Page 1 used in the SQL on Page 2 to determine the result set. The Where Clause in SQL Query containing the bind variable is as follows:
    AND hp.party_name     = ':District_Account'
    When I run Page 1 and click on the link to execute Page 2, I get 'No Data Found'. The setup of the link is as follows:
    Column_Name = District_Account
    Link Text = #District_Account#
    Target = Page in this application
    Page = 2
    I'm a rookie working in V1.6...any help would be greatly appreciated!
    Thanks,
    Becky

    I don't see any parameter being passed in that URL. A little sample: http://htmldb.oracle.com/pls/otn/f?p=33203:4<br>
    when you click on the edit link the URL looks like this:<br>http://htmldb.oracle.com/pls/otn/f?p=33203:5:16073998852455071705::NO:5:P5_TABLE_NAME,P5_OWNER:PRESIDENTS_THEMES%2CBLUETEST<br><br>
    where P5_TABLE_NAME and P5_OWNER are the items and PRESIDENTS_THEMES and CBLUETEST are the values.<br><br>
    The SQL on the filtered report looks like:<br>
    SELECT *
    FROM all_tab_cols
    WHERE table_name = :P5_TABLE_NAME
      AND owner = :P5_OWNER<BR><BR>

  • Passing Shared Variable from subreport to main report

    Hello,
    I am having difficulty passing the shared variable from the subreport to the main report.  For some reason, when viewing the data, the value for the very first row is returning a 0 but the second row is returning the value that should be in the first row.   Does anyone have an idea of what I'm taking about?
    Thanks.
    Z

    In Subreport there is a group based on the client.  There is a summarized amount field in this grouping.  I placed a formula in the grouping and suppressed it.  The suppressed formula is listed below.
    {@ store client payments}
    WhilePrintingRecords;
    Shared CurrencyVar cRelatedPayments;
    cRelatedPayments := cRelatedPayments+Sum ({amount.amt}.{client.client_number});
    cRelatedPayments;
    In the main report, there is 2 groupings, first grouping is the client and second is the invoice.  The client grouping is displayed while the invoice grouping is suppressed.
    The following is the formula in the main report to get the shared value.
    WhilePrintingRecords;
    Shared CurrencyVar cRelatedPayments;
    cRelatedPayments;
    This is placed in the client grouping.
    I hope this helps.
    Z

  • Pass a value from a sub report back to a main report

    This may not be possible but i though i would see if i had any options.
    I have a main report with sales data and a sub report with budget data in the footer. Neither are linked to each other as i do not have a common field.
    I was hoping to bring a value through from the sub report to the main report or vice versa for a calculation. Its just one calc to work out the percent of sales against budget. sales/budget total.
    stuck!
    Any help would be appreciated.

    Thanks for the reply but this has not worked.
    I created a formula field on the main report HEADER @myValue with:
    Whileprintingrecords;
    Shared numbervar myValue:=0;
    Then I created a formula field in the sub report @myValue with:
    Whileprintingrecords;
    Shared numbervar myValue;
    myValue:= {@Budget-Month};
    @budget-month being the field i want to pass through to the main report.
    I placed this formula in the same section as the @budget-month formula field which is in the report footer
    Then i created a formula field @AVG, added it to a new section below the current fields and used the below
    Whileprintingrecords;
    Shared numbervar myValue;
    //calculation using MyValue
    {@myValue}/{@Sales Total}
    I get an error with the @myValue part in this formula "a number or currency amount is required here"
    I did have to change the Shared number from your formula to shared numbervar as number was not accepted. Does that matter?

  • Back arrow does not work with SQL Server Reporting Services Reports. When one pages back from a sub report the back action appears to skip moving to the previous step. IE 8 works fine?

    I have a SSRS report that has a parameter driven drop down list to select a catagory for a report to run a summary for the category in Report Manager. When the report runs there are links to a sub report with more detailed information about the category summary. Firefox runs everything correctly up to this point.
    When I try to back arrow from the sub report Firefox skips the summary report page and reverts to the initial page where the sub category can be selected to run the summary report.
    Can you help? IE8 works well with this but has severe spped issues with reports that contain multiple selection parameters. Firefox handles the multiple parameters very fast but has the page back issue.

    I have a SSRS report that has a parameter driven drop down list to select a catagory for a report to run a summary for the category in Report Manager. When the report runs there are links to a sub report with more detailed information about the category summary. Firefox runs everything correctly up to this point.
    When I try to back arrow from the sub report Firefox skips the summary report page and reverts to the initial page where the sub category can be selected to run the summary report.
    Can you help? IE8 works well with this but has severe spped issues with reports that contain multiple selection parameters. Firefox handles the multiple parameters very fast but has the page back issue.

  • Create shared variables from a table

    hi!!
    well, what i want to do is to create a shared variable using a table, with variables names and values i want to take them,
    i have a litte example, to see how can i take the name of the shared variables from a table,
    can you help me??
    thanks
    Attachments:
    Shared Variable.vi ‏28 KB

    HI!!
    i have done a program, where i create a sv library, after that i deploy it and finally i want to write something on this sv that i created...
    all runs ok, but i  cant see what i am writting in this sv, for that i choose the NI distributes system manager,
    can someone help me please????
    i think is because the type of data...
    thanks!
    Attachments:
    SV_create_deploy_write.zip ‏34 KB

  • We need to pass the customer id from Parent BO report  to Child BO report.

    Hello Experts
    We are using SAP BI BO 4.1 for Business Objects  and SAP BW 7.3 as BW Backend.
    Requirement: We need to pass the customer id from Parent BO report  to Child BO report.
    Issue: Customer (0CUST_SALES__CUSTOMER) Characterisitic is used where in the display characteristic is set to Key i.e 'Display As "Key" ' But the In BO the Dimension appreas as Text .
    I have tried out by changing the display characteristic as KEY/ TEXT/ KEY & TEXT but still at the BO end the it is displayed as TEXT.
    Workaround Tried:  I have used the detailed object for the Dimension 0CUST_SALES__CUSTOMER- key in SAP BO i.e the key value where in we are able to view the customer ID. But we are unable to pass the value from parent report to child report  as the query level Filter cannot be applied onto a detaield object.
    Is this a BI- BO Integration issue?? Kindly help me out with the same.
    Regards
    Akshay.

    Hello Victor,
    I have gone through the doc sent. It was helpful.
    Info Object (BW)/ Dimension (BO): 0CUST_SALES__CUSTOMER.
    In SAP BO the dimension has detailed object under it 0CUST_SALES__CUSTOMER- KEY and 0CUST_SALES__CUSTOMER- TEXT.
    Now I can pass "0CUST_SALES__CUSTOMER- KEY" from the parent report. But in the child report we cannot apply Query level Prompt / Filter on the detailed object which will hold the parameter passed from the Parent report.
    Q1: Can we apply prompts on a detailed objects?? Is there any configuration  changes required.
    Q2: Is there any other method the achive the same??
    Regards
    Akshay.

  • Scripting - Passing and Enterprise variable from script to script

    Hello all,
    We are using UCCX 7.0_SR5
    I am looking to be able to pass a captured variable from one script to another.
    We use a message in queue where a caller waiting in queue can choose to leave a message and then that message is queued back into the sytem for the next available agent. When that agent recieves the message in queue they basically call back out to the customer leaving the message.
    We capture a variable in the first script when they decide to leave a message. The variable holds the call back number that they enter into the system. There is a second script that presents these message in queue calls to the agents. We would like to pass that variable that holds the number enterend by the customer to the second script so that that number appears on CAD in the enterprise data fields. The reason behind this is so the agent has a number to call back in the event they don't reach anyone when the system calls back out and the message left by the customer does not contain a call back number.
    How can I pass that variable from one script to another so it can be presented in CAD for the agents?
    Thanks for any help and let me know if you need any further information.

    You would use a "Get Call Contact Info" step to set your callerID variable, where the "Calling Number" attribute is set to your callerID variable.

  • Add Array grid  report into Layout/tab ExtJS?

    How to add Array grid report into Layout/tab ExtJS?
    Array grid examples are from >
    http://apex.oracle.com/pls/apex/f?p=43040:4:467728553403435
    js>
    Ext.onReady(function(){
    4
    5var munkyData = [
    6
    7["7369","SMITH","CLERK","7902","17-DEC-80","800"," ","20"]
    8,["7499","ALLEN","SALESMAN","7698","20-FEB-81","1600","300","30"]
    9
    10,["7521","WARD","SALESMAN","7698","22-FEB-81","1250","500","30"]
    11
    12,["7566","JONES","MANAGER","7839","02-APR-81","2975"," ","20"]
    13
    14,["7654","MARTIN","SALESMAN","7698","28-SEP-81","1250","1400","30"]
    15
    16,["7698","BLAKE","MANAGER","7839","01-MAY-81","2850"," ","30"]
    17
    18,["7782","CLARK","MANAGER","7839","09-JUN-81","2450"," ","10"]
    19
    20,["7788","SCOTT","ANALYST","7566","09-DEC-82","3000"," ","20"]
    21
    22,["7839","KING","PRESIDENT"," ","17-NOV-81","5000"," ","10"]
    23
    24,["7844","TURNER","SALESMAN","7698","08-SEP-81","1500","0","30"]
    25
    26,["7876","ADAMS","CLERK","7788","12-JAN-83","1100"," ","20"]
    27
    28,["7900","JAMES","CLERK","7698","03-DEC-81","950"," ","30"]
    29
    30,["7902","FORD","ANALYST","7566","03-DEC-81","3000"," ","20"]
    31
    32,["7934","MILLER","CLERK","7782","23-JAN-82","1300"," ","10"]
    33
    34];
    35
    36var store = new Ext.data.SimpleStore({
    37 el: store,
    38 fields: [
    39 {name: 'empno', mapping: '0'},
    40 {name: 'ename', mapping: '1'},
    41 {name: 'job', mapping: '2'},
    42 {name: 'mgr', mapping: '3'},
    43 {name: 'hiredate', mapping: '4'},
    44 {name: 'sal', mapping: '5'},
    45 {name: 'comm', mapping: '6'},
    46 {name: 'deptno', mapping: '7'}
    47 ]
    48 });
    49
    50store.loadData(munkyData);
    51
    52var grid = new Ext.grid.GridPanel({
    53 el: grid,
    54 store: store,
    55 columns: [
    56 {id:'empno',header: "Employee",sortable:true, width:100,dataIndex:'empno'},
    57 {header: "Name", sortable:true,width:75, dataIndex:'ename'},
    58 {header: "Job", sortable:true, dataIndex:'job'},
    59 {header: "Manager", sortable:true,width:75, dataIndex:'mgr'},
    60 {header: "Hire Date", sortable:true,dataIndex:'hiredate'},
    61 {header: "Salary", sortable:true,width:50,dataIndex:'sal'},
    62 {header: "Commission", sortable:true,dataIndex:'comm'},
    63 {header: "Department", dataIndex:'deptno'}
    64 ],
    65 stripeRows: true,
    66 width:700,
    67 autoHeight:true,
    68 title:'Array Grid'
    69 , renderTo: 'munkyDiv'
    70 });
    71});
    any references?
    regards
    Gordan

    Hi Mark,
    thanks for reply, I was making example on
    http://apex.oracle.com/pls/otn/f?p=43048:22:2659745156195172
    using debug grid layout and put into REGION_05
    ...< div id = "munkyDiv" > #REGION_POSITION_O5# < / div>
    in this way I can add 1,2,3 or more reports as tab and grid.
    Simple example as first step is basic layout (integration ExtJS and Apex)>
    http://apex.oracle.com/pls/otn/f?p=43048:15
    username/pass EXTJS/EXTJS
    regards
    Gordan
    Edited by: useruseruser on Aug 8, 2010 2:51 PM
    Edited by: useruseruser on Aug 8, 2010 2:52 PM

  • How do i create and pass a global variable from one vi to several sub-vi's?

    Hi Guys,
    I am trying to create a program that opens several front panels (sub-VI's) in sequence. in each front panel, the user would open a file that the name is obtained from the previous sub-VI. I would like to know how i could pass the filename and refnum of the file thorough from one sub-vi to another. A global variable would do it in VB, but how do we do global vars in LABWIEW. thanks
    Papish

    I put together a sample VI and Sub VI that illustrates how to pass a Refnum and access a data file while in a Sub VI.
    For multiple VIs just repeat the sub VI process.
    You probably don't wanna use a Global Variable if not needed (can add to the mess down the road haha).
    Let me know if it helps you out! Or if I can clarify anything else!
    Chances are if you have seen VI in the forest it hasn't fallen.
    Attachments:
    Passing Refnum.zip ‏21 KB

  • Passing variables from form to report.

    I have a portal form that goes to a report on submit. I need to pass a couple of variables from the form to the report for display. How do I do this?

    Hi Sharmila
    thanks for that, the thing is I've tried this and it doesn't seem to work.
    My report fields are :p_property and :p_event.
    The code in my form is:
    declare
    l_property_reference VARCHAR2(20);
    CURSOR get_event_reference IS
    SELECT max(event_reference)
    FROM eh_event
    WHERE property_reference = l_property_reference;
    event_v VARCHAR2(10);
    begin
    l_property_reference := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'A_P_PROPERTY');
    OPEN get_event_reference;
    FETCH get_event_reference INTO event_v;
    CLOSE get_event_reference;
    go('mobileweb.rpt_prop_event_success.show?p_arg_names=p_property&p_arg_values='||l_property_reference||'&p_arg_names=p_event&p_arg_values='||event_v);
    end;
    The report gets called but the fields are blank.
    Rich

Maybe you are looking for

  • Are Stickies in StickiesDatabase? I need to backup bad system in Disk Mode

    My friend has a PowerBook G4 with a pretty corrupt OS 10.3 on it. I'm praying I'll be able to get it started in FireWire Target Disk Mode so I can backup files, then I'll re-install the OS. Are the Stickies kept in ~/Library/StickiesDatabase ? If I j

  • Assign patch levels for component versions of system: Maintenance Optimizer

    Hello, I am trying to have Maintenance Optimizer check for what files I need to download.  However, I get the following error: Assign patch levels for component versions of system SXM. I susepect that the problem really lies in the fact that the "SP

  • How to open dot-files as doc?

    Hello there, we have several company word-templates (extension dot) and we´re planing to access these templates via the Portal (file system repository with connect to the server). If I doubleclick the dot-file in the windows explorer, I receive a doc

  • Problem uploading/File Zilla!!

    I am new to website building. I have completed my website and am now ready to upload it. My host is register.com I was told in order to upload the website I must use File Zilla. My problem is this... I have saved the website in my user folder under t

  • Safari & CBS Sports not playing well together

    Logging on to my CBS (fantasy football) home page works just fine; but when I attempt to the page to 'rank' my players strange things happens (see screen shot below). Is there a plug-in, or Safari workaround; or do I have to switch back to Firefox ag