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

GETTING A SUBTOTAL FROM A FORMULA ON THE SUBREPORT 2

Status
Not open for further replies.

villica

Programmer
Feb 25, 2000
332
0
0
CA
I have a main report and a subreport.
On the sub report I have the following formuala
@totalvalue
(FetchNumberVar ("COST") *{@TOTAL})
cost is comming from the main report
this formula is inserted on the group header on the subreport
how do add all this values at the end of the report. I right click and I don't get any options to change it to a sumary field. what are my other options. Please help me anyone. I have trying to get this going for about 2 weeks now and I am not getting anywhere. thanks
 
Hi

Are you trying to summarise your formula(s) in the sub report or back in the main report?

What version of Crystal are you using (version 7 plus allows you to use Shared Number Var instead of Store and Fetch).

The SUM button does not work for summarising this formula.

I think the answer is to assign to the formula output to a Shared NumberVar and call that Shared NumberVar (and all the others that you are trying to summarise) in a summarising formula elsewhere in the report.

I.e
@totalvalue
Shared NumberVar Total Value := Sum ("COST") *{@TOTAL})

@totalsales
Shared NumberVar Total Sales := Sum ("UNIT") *{@TOTAL})


@SUMMARY
Shared NumberVar Total Value;
Shared NumberVar Total Sales;
Sum (Total Value + Total Sales)

HTH

JD
 
Thank you for your reply. I am still stuck. I am trying to summarize on the subreport. I am using crystal 6. What are my options. I am beggin now.

thanks
 
Don't use Fetch to bring the cost to the subreport. Use a link to pass the value to a parameter in the subreport. Create the parameter in the subreport, and then use the "edit Subreport Links" options to link it to the value in the main report. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top