3 Replies Latest reply on Feb 20, 2012 8:54 AM by philmodjunk

    Report Totals

    RobinNeeves_2

      Title

      Report Totals

      Post

      Hi, can you help me please,

       

      I have created a report that lists items that I need to calculate, each report may have a number of product listed on individual line and there are different type of products. I.e. AAF, WAT, BLA and so on tree are also different sizes to the products for instants.

       

      9LT WAT

      6LT AFF

      2KG DP

      120x120 BLA

       

      These are made up in three field, size (9), Unit (LT), Type (AFF).

       

      I need to list these on the report as laid out bellow

       

      SizeUnit     Type  Total

        9             LT       WAT       2

        6            KG       DP          4

                      ------

                          6

       

      And so on.

       

      Can you suggest the best way to create these calculations and where.

       

      Thank you for your help.

       

      Robin

        • 1. Re: Report Totals
          philmodjunk

          In your example, what the the 2 and 4 represent? 2 records of type, size or the sum of a quantify field?

          The basic solution is to define a summry field that computes either the count of a nonblank record or the total of a quantity field. On a list view layout, remove the body layout part and replace it with a sub summary layout part "when sorted by Type" or "when sorted by size" (Pick one or the other depending on how you want the rows of data ordered in your report.)

          You can then sort your records by both type and size fields. If you sort by type, then size and use "when sorted by size", you can group your records by type, then by size and show your subtotals for each combination of type and size.

          If you sort your records by size, then type and specify "when sorted by type" in the sub summary layout part, you can group your recors by size, then show a total for each type.

          In either approach, the same summary fields placed in a trailing grand summary part will display a total for all your records in the found set.

          • 2. Re: Report Totals
            RobinNeeves_2

            The example 2 & 4 were just an example of the totals sum of each type.

             

            The body is being used to list all products on site.


            can I create sub summary that can show the amounts and totals to print on the last page only and what function name would I need to use


            Thank you

            Robin

            • 3. Re: Report Totals
              philmodjunk

              Sub summary layout parts are used to report totals for sorted groups of records.

              If you were to print out a summary report like this

              Product sub total for product X

                 Individual item recors for product X listed here

              Product totals for product Y

                 individual item recors for product Y...

              and so forth.

              You can also put the sub summary part after the group of individual records to show subtotals below the group of records.

              It takes much less work to set up that type of report than to try to add a "recap" list of totals at the end--which can't be done with a sub summary layout part.

              A portal to a table where you have one record for each product-size combination could be used for such a final page, but only if you can list all those entries in your portal--so it's easier to pull off if your report lists only a fairly small number of products.

              You could also create the original report layout that I described and use save as PDF to generate your report. Save as PDF as part of a script gives you the option to append a PDF generated by it to the end of an existing PDF, so you could use Save As PDF to create the first part of your report listing the individual items and then you change layouts to a second layout with the sub summary layout parts to produce a PDF of the totals to append to the end of the first PDF. The main limitation to this approach is that your totals would start on their own page--not be merged onto the last page of your report.