Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Questin re: Running totals in a report

Questin re: Running totals in a report

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 16 Dec 99 18:18:12 GMT
Message-ID: <38592ce4.0@news.victoria.tc.ca>


I have an Oracle report question which I suspect has a simple answer but I am quite new to Oracle reports so I am looking for advice.

The report I need to write is basically a simple rollup of rows that look like the following pseudo record...

    | product | region | year | colour | sales1 | sales2 |

The query I use to provide the initial data for the report is

    select product, region, year, colour, sum(sales1), sum(sales2)     from PRODUCT_SALES
    group by product, region, year, colour;

I use report builder from oracle developer 6. I use the report wizard with the group-left report type to add running totals. However there is one set of running totals that I do not know how to generate within the report.

   This is an example of the report

   product area year colour sales1 sales2

                     1998   black  45      25
                            orange 10       9

--- ---
total 55 34 region1 total black 90 45 * region1 total white 20 30 * region1 total orange 10 9 * total region1 120 84

Most of the running totals calculations are set up by simple point and click options within report builder. The lines I have questions about are flaged with the *'s. These are running totals for sub-categories of the data. I assume there is a "normal" way to handle this in Oracle reports. The report was originally programmed in Datatrieve. In that language a break is programmed after each colour is printed, and the totals of each colour are simply added up and then printed when the "regular" total line is printed.

I am wondering what the most appropriate way to handle this is within Oracle reports.

Suggestions, advice, or examples would be appreciated.

...malcolm dew-jones Received on Thu Dec 16 1999 - 12:18:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US