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

Can't add a total for a field which is based on a formula

Status
Not open for further replies.

Brijj

Technical User
Jun 13, 2005
1
US
I am trying to revise a client invoice format for Wind2 using Crystal Reports and I need to add a total field for the professional fees sub-report. I had to modify the billing charge field, as the invoice format that we were using using a field report, (bmblct.ncttot) which used the summary of the cost amount assigned to each time record that made up the number of bill hours for each staff type. Our invoice is a summary type invoice, and only gives the staff type, total number of bill hours for the staff type, billing rate, and total charge for each staff type. When we implemented a new rate schedule with odd billing rates, it caused rounding issues on the invoice. (For example, a staff code with 1.25 billable hours at $61.26/hour will print on the invoice as $76.59, if the 1.25 hours is made up of more than one time entry) When I right click on the formula I made to multiply the billable hours by the billable rate, I do not have the option to insert a summary. When I try to create a new formula to sum that field, I get the error that "This Field Can Not Be Summarized." The formula I used to get the correct billing charge for each staff type for each phase is Sum({bmblct.nbillhours}, {bmblct.cstypeid})*{bmblct.nrbillrate} and called it @Billing Charge. But I can't sum this field. Is is because this is a Sum formula? Any help is appreciated, I am not brand new to Crystal, but I am far from an expert.
Thanks,
Bridgitte
 
How about showing some sample data? It is unclear whether you are trying to total within the subreport or whether you are trying to total shared variables in the main report.

If you are just trying to summarize a formula that already contains a summary, you can use a variable:
//{@accum} to be placed in the same section as {@billingcharge}:
whileprintingrecords;
numbervar sumx := sumx + {@billingcharge};

//{@display} to be placed in the footer:
whileprintingrecords;
numbervar sumx;

If you are trying to summarize at a group level, you will also need a reset formula:

//{@reset} to be placed in the group header:
whileprintingrecords;
numbervar sumx := 0;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top