Greetings, I have a subreport within a report and I would like to create a sub total for each customer. The report is already grouped by customer BUT the cost data I need to sub total is coming from a subreport! Is there a way to do this?
Which report is grouped by the customer, the Main?
Generally a short paragraph describing your problem is insufficient, were you to receive a spec like this you'd instantly contact the requestor, so this type of post will result in more questions because you don't bother to supply technical information (not even the version of your software, much less the database, etc.).
In general subreports are bad ideas, if you post the environment, someone might be able to meaningfully contribute to the overall architecture, rather than trying to supply technical information for a predesigned report.
You can use shared variables to pass data from subreports to main reports, example:
Main report Customer Group header formula:
whileprintingrecords;
shared numbervar MyNum:= 0
Sorry about the lack of info, I am using Crystal 8.5 and fetching data from a progress 9.1D database via ODBC. You figured out the problem though, thats exactally what I am trying to do. And The code you posted seems to make logical sense, however I think we are doing the sum in the wrong place.
I need to make the sum at the end of the main group footer because it should be summing the subreport data. Ill try to attach some screen shots, sorry if im not making alot of sense
The variable is being passed correctly from the subreport, I just need to figure out how to make a sum of it and also take into account that the formula seems to be a step AHEAD of the main report. Example, the variable is equal to the value of the previous row in each record so the total would not include the first and last value of each main group
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.