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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Summary of totals 1

Status
Not open for further replies.

clevelandjwb

Programmer
May 18, 2004
28
US
I have prepared a report which contains project data divided by sub account. Each project has between 3 and 10 subaccounts. The summary would contain the ending balance for each subaccount.

The balance is available on each detail record and these are used to print the totals within the report.

I think what I need is something like an array which I could fill with the totals as the report is being processed, then in the project footer I would need some way to print out lines from that table and reset the table to the empty state.

I do not know enough about the program to have any idea how to do this or whether it is even possible.

I am using Crystal 8.5

Thanks for any help

John

 
Try posting example data and what the output should be. Text descriptions of data leave too much to the imagination, think of it as creating mini spec.

It generally proves useful to post the database being used as well.

In other words, please post technical information.

The project footer (I assume you mean a group footer by project) can get totals by right clicking the field in the details section and selecting Insert->Summary->Sum and check include totals for all groups and the grand total.

You should be done.

If not, please provide the specifics.

-k
 
Let me try to give a little sample data without giving all of it which might be a little complicated.

First, you are right, I am talking about a footer that is associated with a variable named "project". Each project would have a variable named 'subacct' for sub account. Within this a further grouping that is not relevant to the discussion and detail records.

A brief sample of some data.

The project header is essentially merged into the page header so it does not print.

A subacct header would look like

BAL FWD {beginning balance} {subacctname} {subacct#}

Detail Records


A subacct footer would look like

END BAL {Ending balance} {Subacctname} {subacct#}

There would be multiple instances of this subacct header - detail - subacct footer within a project. The key pieces of information that I would like to include in the summary in the project footer are the {ending balance}, {subacctname}, and {subacct#}. The summary would look something like:

SUMMARY

001 Support $1,200.00
014 Passage $2,000.00
021 Building $125.32
140 Transmission $200.00

The reason for the summary is to pull out important data from what is probably a 3-4 page report for each project.

What I have throught through since I wrote is a massive creation of formula variables with one for each possible subacct name and amount such as: @001name, @014name, @021name, @140name, @001balance, @014balance, @021balance, @140balance. I am not quite sure how but I should be able to populate the variables with the appropriate balances and text. I could then make the project footer be broken into about 20 sub sections (the universe for the subacct numbers is limited to about 20 numbers) with each possible subacct# having its own section and suppress the lines that would print as zero. It sounds like a lot of work but I believe it would work although I have not yet tried it, hoping for something not quite as involved.

I hope this gives a clearer understanding.

John
 
Since you want complex totals, it might be worth writing a separate subreport that would re-analyse the data without regard for the details printed in the main report.

If you don't already known Subreports, they are stand-alone reports that are called from a particular section. For grand totals, you should put it in the report footer. Also if the totals do most of the work of the main report, do a 'save as' to get a copy of the main report and then import it as a subreport, which you can then edit for your needs.

Subreports can also be used for detail lines, though this is slow and should be a last resort.

Madawc Williams
East Anglia, Great Britain
 
You should be able to use running totals for the project footer. Using the running total expert, choose the field you want to summarize, evaluate on change of formula:

{table.subacct} = "Support" //change for each subacct

Reset on change of group (project).

Then you could add the subaccount # and name to the project footer with text boxes, followed by the running total.

-LB
 
I ended up learning quite a bit about subreports and that was the perfect solution to the problem. Thanks for your help.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top