To catch a total summary

Is there a way to catch a total summary in the sub-report from the main report?

This is the note (kbase) I referenced in case you cannot get into the notes system:
Symptom
A report contains a subreport. Data from the subreport is required for calculations in the main report.
How can you share subreport data with the main report in version 7 (or higher) of the Crystal Reports Designer?
Resolution
Shared variables, introduced in Crystal Reports version 7, make it easier to pass values from a subreport to the main report. Using shared variables requires two formulas: one to store the value in a shared variable, the other to retrieve the value from the shared variable.
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.

Similar Messages

  • Running total / Summary - 3 groups

    Dear All,
    I am facing an problem in Summary / Running Total in my crystal  Report. I have 3 groups as under :
    1) Document Series
    2) Territory
    3) Transaction Details which includes Document Total
    Now Example my document series is Projects and Territory is Japan and India and in Transaction Details which is document total has values of 100, 200, 300,500 for Japan and 300,400 for India
    Now I am not able to bring a summary / running total of Japan which should be 1100 and for India 700 respectively.
    I want summary for Document Series Also means for Projects it should show the total of 1100 + 700 = 1800
    and a grand total of 1800 if its only projects series and if other series it should show projects + handling series.
    Pleas help as I have tried but not been successful.
    regards,
    kamlesh

    for Territory Running total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: on change of field -> Territory
    Place it in Territory Group footer
    for Document Series Total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: documentseries
    Place it in Document Series group Footer
    for Grand Total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: never
    Place it in Report Footer
    HTH,
    Jyothi

  • Group totals summary in another group summary section

    I have a report requirements that need to re-display the group total in a summary section.   Please see below simple example.  The second summary does not have fixed number of Units, it depends how many units are in each Department.
    I am not able to reproduce the department summary.   Is this possible in SSRS, I can do this in crystal?
    Example:
    Department ABC  Unit 100
    details line here....
    Unit 100 totals here
    Unit 120
    details line here.....
    Unit 120 totals here
    Unit 140....... 
    Department ABC summary
    Unit 100 total
    Unit 120 total
    Unit 140 total
    Department XYZ 
    Unit .................
    Department XYZ summary
    unit totals.................... (one to many)
    Final Summary
    Department ABC total
    Department XYZ total
    Jim Pan

    Hi Jim,
    In your case, we can work around the issue in SSRS. Suppose we have a dataset (DataSet1) include following fields: Department, Unit, Amount. Please refer to the following steps:
    Add a table in the report body. Please refer to the table structure below:
    Parent Group: Department
    Child Group: Unit
    Data: Amount
    Click the blank arrow of (Details) in the Row Groups dialog box. Click Add Total.
    Use the same method add total to the Unit and Department group.
    There is a screenshot for your reference:
    If you have any questions, please feel free to let me know.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • ALV background printing with totals summary

    hi,
    we have defined an ALV layout that displays only the totals/subtotals and we would like to print this in the background. the report allows us to specify the layout from the report selection screen.
    however, it doesn't seem to work when printing in the background. it always expands into detail rows. we are using FM REUSE_ALV_GRID_DISPLAY in 4.6C system. any solution to this?
    thanks in advance.

    The variant in which you want the report to use,  is this variant a global variant which can be seen by the "BACKGROUND" user?  If not, this could be you problem.  If the variants are user specific, the variant will not be seen by the "BACKGROUND" user.  I would suggest setting up the variant as the "BACKGROUND" user.
    Regards,
    Rich Heilman

  • Fi-sl totals and line items

    dear experts,
    i have timestamp generated for actuals line items table for fi-sl.
    i also have the totals summary table but it has no timestamp.
    i like to find out how can i compare records for the 2 tables given that timestamp is not present in totals table.
    regards
    ernesta

    Hi,
    Refer for FI-SL Totals Records.
    http://help.sap.com/saphelp_nw70/helpdata/EN/04/e04c40cc538437e10000000a155106/frameset.htm
    The DataSource delivers transaction data from a customer-defined FI-SL ledger on a totals record level. This DataSource is used to determine the balance carryforward, since the line items DataSource 3FI_SL_XX_SI does not supply this. Restrict the selection to period 0 to determine the balance carryforward (e.g. 0FISCPER = 000.2004 to generate the balance carryforward for the closed fiscal year 2003).
    You should only extract period 0 for a closed fiscal year, since the data selection only functions in the full upload.
    Delta Update
    The DataSource must be started in the full upload to determine the balance carryforward.
    Thanks,
    JituK

  • How can I display the vendor associated with result of my running total sum

    I have a report that lists vendors with their most vecent order dates.  I need to set up a rotation so that the vendor with the latest order date is next to be selected.  I used the running total summary to pick the latest date.  How can I display the vendor associated with result of my running total summary?

    If your "latest" order date means the "oldest" order date, why don't you try this:
    Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
    This will make your oldest order your first record shown. 
    You can then create a running total count for each record.
    Lastly, in your section expert under conditional suppress X+2 formula, write this:
    {#CountRecords}>1
    The result will only show the oldest record in your report.
    I hope that helps,
    Zack H.

  • 500 Internal Server Error OracleJSP: code too large for try statement catch

    We have an application which uses JSPs as front end and we are using Struts 1.1. When we run one of the JSP it shows the following error after executing .We are using OCJ4 server having version 9.0.4.0
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:E:\oracle\product\10.1.0\AS904\j2ee\home\application-deployments\VAS3006\vas\persistence\_pages\\_Requirement .java
    code too large for try statement catch( Throwable e) { 
    7194
    code too large for try statement catch( Exception clearException) { 
    44
    code too large for try statement try { 
    23
    code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { 
    The JSP/application runs okay on one machine (System Tesing machine)with OCJ4 server having version10.1.2.0 but throughs an error on other machine( Development machine)with OCJ4 server having version9.0.4.0.The question is why it is running on one machine ane giving error on other machine I am aware that there can't be more than 64kB of code between try-catch block .Total size of the generated JSP class in our case is 577KB.
    Is the problem because of different version of Application server OC4J?.Is it any fix for this? Or Can anyone please suggest a work around. Or is there a method by which the JSP generated code is split between different try - catch blocks rather than a single try-catch block.Utlimately We don't know the whether is it a problem with JVM or hardware .
    It would be really helpful if you would provide me with some suggestion and input.
    Regards
    Shyam

    Sir,
    I am aware of the limitations of JVM that it won't allow java code more than 64Kb in method but we are using different versions of Application server .Application is working okay with OC4J application server(10.1.2.0) but gives error on Application server with version 9.0.4.0. Is this a problem with OC4J application server 9.0.4.0. I had gone through the documentation ofOC4J 9.0.4.0.application server but it does not mention about the this bug/fixes.
    Please giude me on the same.
    Regards,Shyam

  • How do I put a running total in a Reports 6i Report?

    I need to write a report which shows a running total at the foot of each page. The report is a series of (potentially) multi-page sections each formatted like this:
    Page 1
    ======
    Tom £100
    Dick £150
    Harry £100
    Sub Total £350
    Page 2
    ======
    Peter £200
    Paul £50
    Mary £100
    Total £700
    Lines are of variable height, so I can't predict how many there'll be on a page.
    The help system just tells me to "use a summary field". Yeah, right. Can anybody give me some more detailed instructions?
    -- Chris Hunt

    Thanks for that.
    I didn't really express the problem as well as I might have done, as the Sub-Total needs to be the sum of all the items on the current page and on all preceeding pages. resetting on page just gives you the total for that page.
    I did find a way to do it. First you set up a summary field in the same group as the data lines, summing the amount and resetting on the parent group. This gives you a running total for each row:
    Page 1
    ======
    Tom £100 £100
    Dick £150 £250
    Harry £100 £350
    Page 2
    ======
    Peter £200 £550
    Paul £50 £600
    Mary £100 £700
    You don't actually output this summary field in the prinout (except when debugging :-) ). Now create a summary field at the foot of the page, or in the margin. Set its value to the Max() of the running total summary, resetting on page. That gives you the amount required, assuming all individual amounts are positive.
    If it's possible to have negative amounts, I expect that using Last() instead of Max() for the page summary would do the trick.

  • Summary by report problem

    I have areport that list the employees and thier salaries without groupping them, the problem is i make summary by page and summary by report at the last page the summary by page appear under the summary by report , i want to make the summary by report appear under summary by page .
    i try many times with the property at last page and it doesn't work

    If you have not been able to get things in their right places with the Layout Wizard, you are going to have to change the layout.
    The Grand totals are above the Page totals. What you want is the Grand Totals to be right at the bottom of the Report,
    For that you are going to ahve to change the layout.
    Go to the Layout and make room at the bottom ana add items sourced from the Grand Total Summary Columns.
    Remove the Grand Totals from their current places.
    Dave

  • Grand totals across hierarchy

    What's the best way to calculate a grand total across a hierarchy (using hierarchical grouping)?

    Hi Mike,
    just a thought: Your aim is to have something like Total Sales (actual year) / Total Sales(previous year) displayed in your report. This is a total summary calculated upon a certain key figure which is included in the query.
    The partial summaries of your key figure are delivered correctly from your SAP system in CR for each hierarchy level. Since a total summary is not delivered the problem is now that you do not have access to the sums for the sales of the previous year in your query. This way you could sum up in CR the sales for the actual and the previous year and calculate the total percentage manually at the end.
    Assuming now that you do have the partial sums of the sales for the actual year in your query though, you can indirectly calculate the partial sums for the previous year :
    Sales(previous year)@HieracrhyLevel X = Sales(actual year)@HierarchyLevel X / Percentage Key Figure@Hierarchy Level X.
    All you have to do now is to pick up a specific hierarchy level (you know how to do this) and sum up the calculated sales from previous year and do your percentage calculation based on the total sums  at the end.
    Hopefully you do have the sales of the actual year in your query as a separate key figure.
    Regards,
    Stratos

  • Voice memos do not delete (1 hr of recordings)!

    Where I find these "undeleted" voice memos.  When I connect iPhone, itunes opens and on the top right I click iPhone. There are 10 tabs in total (Summary - Info - Apps - Tones - Music - Movies - TV Shows - Books - Photos - On This iPhone). I click On This iPhone.  On the far left side, it lists from top to bottom Music - Movies - Tones - All of my playlists.  The last one lists Voice Memo.  I click on Voice Memo.  I find 10 messages from June and July 2012, which I have deleted off of my iphone AND itunes.  I want to delete these 10 voice memos.  They are NOT on iPhone or iTunes.  I tried searching through computer, but nothing is found. 
    So why not delete them now? I physically can't.  I right click on the voice memo and there is no option to Copy, Paste, DELETE file.  It only gives the option of playing the music.  It is easier to see what I am saying so I am attaching a snapshot.  Notice that the voice memos are on my iphone, but not in itunes.  I looked all over itunes and there is not one voice memo.  Also, under the Music tab, include voice memos is not checked.

    try this one.
    https://discussions.apple.com/message/12383985#12383985

  • How to convert an Image to a byte array?

    I want to make a screenshot and then convert the image to a byte of arrays so I can send it through a BufferedOutputStream.
    try
                   robot = new Robot();
                   screenshot = robot.createScreenCapture(new Rectangle(500,500));
                   imageFile = new File("image.png");
                   ImageInputStream iis = ImageIO.createImageInputStream(screenshot);
                   byte[] data = new byte[1024];
                   byte[] tmp = new byte[0];
                   byte[] myArrayImage = new byte[0];
                   int len = 0;
                   int total = 0;
                   while((len = iis.read(data)) != -1 ) // LINE 52 --- EXCEPTION CATCHED HERE
                        total += len;
                        tmp = myArrayImage;
                        myArrayImage = new byte[total];
                        System.arraycopy(tmp,0,myArrayImage,0,tmp.length);
                        System.arraycopy(data,0,myArrayImage,tmp.length,len);
                   ios.close();I get this exception while running:
    Exception in thread "Thread-0" java.lang.NullPointerException
    at Server.run(Server.java:52)
    at java.lang.Thread.run(Unknown Source)

    Fixed that. I got a new problem.
    When I connect to my simple server application that reads the image file, converts it to an array of bytes and sends it back, the file is created on the client side and it containts data, but I am not able to open the image. I have checked that the image that the server is sending is working. So where is the problem?
    The client application recieves the image as following:
    public void run()
            try
                socket = new Socket("127.0.0.1", 2000);
                BufferedOutputStream out_file = new BufferedOutputStream(new FileOutputStream("recieved_img.png"));
                BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                int inputLine;
                while((inputLine = in.read()) != -1)
                    char c = (char)inputLine;
                    System.out.println(c);
                    out_file.write(inputLine);
            catch(IOException err){ err.printStackTrace(); }
        }And the server sends the image like this;
    try
              socket = server.accept();
              in=new BufferedReader(new InputStreamReader(socket.getInputStream()));
              out = new BufferedOutputStream(socket.getOutputStream());
              out.write(25);
              while((inputLine = in.readLine()) != null)
                   System.out.println(myArrayImage.length);
              System.out.println(inputLine);
                        out.write(myArrayImage);     // Send the array of bytes
         }

  • Placement and creation of a dynamin array

    I have a report that returns between 100-200 records.
    Sorted by @name+date
    It is only 3 data columns.
    Name -  allocated -  date
    What i want to do is create a 4th column which is the
    calculated by "current allocated" - "previous allocated"
    i have this working with a formula that uses PREVIOUS/NEXT
    However i am unable to total/summary this formula or even
    see it(see Summarize a formula which has Next/Previous)
    so what i want to do is create a dynamic array for each column.
    Name - allocated - date
    How or where do i place the formula that holds the array data ?
    thanks

    Hi John,
    I'm not sure why the gtotal gets zeroed on each page; it should not. Is this column in the details section?
    Here's something you could try with arrays as well:
    1) Create this formula and place it in the section which holds the 4th column:
    whileprintingrecords;
    numbervar array arr;
    numbervar i := recordnumber;
    redim preserve arr<i>;
    arr<i> := {Curr_Prev};
    2) Create another formula and place this on the report footer:
    whileprintingrecords;
    numbervar array arr;
    numbervar result;
    numbervar j;
    for j := 1 to ubound(arr) step 1 do
       result := result + arr[j]
    result;
    Hope this helps!
    -Abhilash

  • EPM 11.1.2.3 in Windows 8 Professional (64-bit)

    I am trying to install EPM 11.1.2.3 in my 7 core Dell Inspirion machine which has 8 GB RAM. I have installed Windows 8 Professional (64-bit) and also have IIS. I could successfully installed EPMA but when I tried to configure, "Performance Management Architect - Configure Database" failed.
    Anyone has any idea how to fix this issue.
    Below is the content of config log file under C:\Oracle\Middleware\user_projects\epmsystem1\diagnostics\logs\config
    ( Oct 04, 2013 09.41.45 PM ): Pass [000 min 50 sec] [PRE] Hyperion Foundation - Pre-Configuration
    ( Oct 04, 2013 09.41.46 PM ): Pass [000 min 00 sec] [COM] Hyperion Foundation - Configure Common Settings
    ( Oct 04, 2013 09.42.49 PM ): Pass [001 min 03 sec] [OCM] Hyperion Foundation - Configure Oracle Configuration Manager
    ( Oct 04, 2013 09.42.56 PM ): Pass [000 min 06 sec] [DB ] Hyperion Foundation - Configure Database
    ( Oct 04, 2013 09.46.42 PM ): Pass [003 min 40 sec] [PRE] Performance Management Architect - Pre-Configuration
    ( Oct 04, 2013 09.46.44 PM ): Pass [000 min 01 sec] [REG] Performance Management Architect - Register with Shared Services
    ( Oct 04, 2013 09.46.44 PM ): Fail [000 min 00 sec] [DB ] Performance Management Architect - Configure Database
    ( Oct 04, 2013 09.47.14 PM ): Pass [000 min 29 sec] [VDC] Performance Management Architect - Configure Dimension Server
    ( Oct 04, 2013 09.47.14 PM ): Pass [000 min 00 sec] [PRE] Calculation Manager - Pre-Configuration
    ( Oct 04, 2013 09.47.15 PM ): Pass [000 min 00 sec] [REG] Calculation Manager - Register with Shared Services
    ( Oct 04, 2013 09.47.17 PM ): Pass [000 min 02 sec] [DB ] Calculation Manager - Configure Database
    ( Oct 04, 2013 09.47.22 PM ): Pass [000 min 04 sec] [PRE] Essbase Administration Services - Pre-Configuration
    ( Oct 04, 2013 09.47.22 PM ): Pass [000 min 00 sec] [REG] Essbase Administration Services - Register with Shared Services
    ( Oct 04, 2013 09.47.26 PM ): Pass [000 min 03 sec] [DB ] Essbase Administration Services - Configure Database
    ( Oct 04, 2013 09.47.51 PM ): Pass [000 min 23 sec] [PRE] Essbase - Pre-Configuration
    ( Oct 04, 2013 09.47.52 PM ): Pass [000 min 00 sec] [REG] Essbase - Register with Shared Services
    ( Oct 04, 2013 09.48.03 PM ): Pass [000 min 11 sec] [PRE] Planning - Pre-Configuration
    ( Oct 04, 2013 09.48.03 PM ): Pass [000 min 00 sec] [REG] Planning - Register with Shared Services
    ( Oct 04, 2013 09.48.23 PM ): Pass [000 min 19 sec] [DB ] Planning - Configure Database
    ( Oct 04, 2013 09.48.32 PM ): Pass [000 min 09 sec] [RMI] Planning - Configure RMI Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [007 min 52 sec] [APP] Hyperion Foundation - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Performance Management Architect - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Performance Management Architect - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Calculation Manager - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Essbase Administration Services - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Planning - Deploy to Application Server
    ( Oct 04, 2013 09.56.33 PM ): Pass [000 min 00 sec] [APP] Workspace - Deploy to Application Server
    ( Oct 04, 2013 09.56.39 PM ): Pass [000 min 05 sec] [ESS] Essbase - Configure Essbase Server
    ( Oct 04, 2013 09.56.55 PM ): Pass [000 min 16 sec] [WEB] Hyperion Foundation - Configure Web Server
    ( Oct 04, 2013 10.14.56 PM ): Pass [000 min 00 sec] [EXI] Exit Tool
    ( Oct 04, 2013 10.14.56 PM ): Pass [023 min 05 sec] Total summary
    ( Oct 04, 2013 10.27.47 PM ): Pass [000 min 08 sec] [INI] Init Tool
    ( Oct 04, 2013 10.27.47 PM ): Pass [007 min 06 sec] [GUI] GUI Wizard
    ( Oct 04, 2013 10.27.49 PM ): Pass [000 min 00 sec] [COM] Hyperion Foundation - Configure Common Settings
    ( Oct 04, 2013 10.27.52 PM ): Pass [000 min 00 sec] [DB ] Essbase Administration Services - Configure Database
    ( Oct 04, 2013 10.27.53 PM ): Pass [000 min 00 sec] [DB ] Planning - Configure Database
    ( Oct 04, 2013 10.28.01 PM ): Pass [000 min 07 sec] [RMI] Planning - Configure RMI Server

    Not supported, use a supported os - http://www.oracle.com/technetwork/middleware/bi-foundation/hyperion-supported-platforms-085957.html
    Cheers
    John
    http://john-goodwin,blogspot.com/

  • Issue in using an AT NEW command in SMARTFORM.

    Hi.
    I am printing a total summary of flight data and then calculating the total price in Smart forms.
    I would like to group the fetched data according to it's Carrid and Connid.
    I would like to ask for some guidance at this point,
    Sr.No     Carrid        Connid           Fldate          Price
    1.            AA            0017            28102007      1000 USD
                                                      29102007      2000 USD
    2.             LH           0402            10102007       1500 EURO
                                                      12112007       4500 EURO
    3.             SQ          0200             14112007       2000 SGD
                                                       16122007      4500 SGD
    We can solve this by using AT NEW FIELD in normal case.
    But, In smart forms I am unable to do that or not finding the appropriate way. Can we use AT NEW in smart form and if yes, where and is there any condition for its applicability.
    If no, what is the best suggested way.
    I appreciate your inputs.
    Good Luck & Regards.
    Harsh Dave

    Hi,
    You can get the functionality of At new by using the Event in loop control in smart froms.
    In the Loop , Go to Data tab.Now in the below 'Sort criteria,
    give the field name in which you want At new Function.
    then Check the Checkbox right.
    You will get an Event tree just below the loop tree.
    In that Event tree,put the Text you want to display only for new value.
    Right clicking on the loop give the text that is displyed multiple times.
    In this way you will get the desired output.
    Regards,
    sujit

Maybe you are looking for