Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtotals by different fields sorted independently

Status
Not open for further replies.

ekl0908

Programmer
Aug 5, 2005
9
US
Can I subtotal the same amount by four different fields on the same report, using WebFOCUS 7?

Not with a nested sort, but four independent sorts.

The situation is that we have a report that gives a grand total of sales and then a choice of subtotals.

To use the hypothetical example of car sales, the report would subtotal all the sales by location, then within that location, you can choose to subtotal it by the make of the car, the color of the car, the size of the car, or the factory where the car was made.

People are calling it up all four ways and then cutting and pasting so that they get a report that has the location, then the subtotals by make of car sold at that location, then the subtotals by color of car sold at that location, then subtotals by size range, then subtotals by factory of origin. This takes a long time, so they have asked for a report that prints it out automatically: By location, with the subtotals for four different sort fields under each location. This is not one sort by multiple fields. It would print all sales for that location by make, then all sales for that location by color, then all sales for that location by size, then all sales for that location by factory.

I have looked in the manuals and in this forum and I haven’t seen a way to do this. Is it possible to do this in WebFOCUS?


Many thanks for your ideas!
 
Is your question you would like the user to be able to choose the level of subtotal for the report or have the report print the same set of subtotals as mentioned above for all users.
 
Thank you for your response, sxscheck!

I would like to print the same set of subtotals for all users.

I have thought of a way to do this: Create workfiles, each sorted by a field called SORTFIELD which is the same length. In one workfile, make the sortfield the size, in another workfile it would be the color, etc. Then combine the workfiles and print them together. I would have to have another number in the file to sort on to keep all the size records together in the report and all the color records together, etc.

That seems like a possible way to do it.

 
I have completed the report using workfiles as I outlined above. It works! [wiggle]

[wavey2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top