Print Page | Close Window

Report Totals

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22975
Printed Date: 03 May 2024 at 4:16am


Topic: Report Totals
Posted By: brockloch
Subject: Report Totals
Date Posted: 22 Sep 2021 at 1:15am
Hi

I have a report that shows all the orders for a range of products. I also have the available stock of each product. The grand total of the product is incorrect e.g if I have 10 in stock of one product and 10 in stock of another product they are both used in 3 orders. If I add a grand total, of what is in stock it should be 20, however it is coming out as 60, as there are 3 instances of each. Hope that makes sense. Any help much appreciated.
Ed

-------------
brockloch



Replies:
Posted By: lockwelle
Date Posted: 22 Sep 2021 at 8:32am
how are getting the data? Is the report joining to the tables directly or from a stored procedure?

If from a stored procedure, I would create a column and populate it so that the total comes out correctly (easier said than done...).

Otherwise, I would try a subreport that would look at the items, and not be concerned about the duplication caused by the usage.

Some possible solutions, I am sure that there are more.

HTH


Posted By: brockloch
Date Posted: 22 Sep 2021 at 9:13am
Thank you for your help. It's directly from the tables, I think I may have to look at sub reports - or send it to excel and total it there.

Thanks again.

-------------
brockloch


Posted By: DBlank
Date Posted: 30 Sep 2021 at 3:02am
you can also possibly use running totals. Create a RT as a sum of the field but evaluate on change of the PK from the table that identifies the stock not the orders


Posted By: brockloch
Date Posted: 05 Oct 2021 at 11:46pm
Thank you I will try that.

-------------
brockloch



Print Page | Close Window