Print Page | Close Window

Subreport to main

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=20827
Printed Date: 02 May 2024 at 9:52pm


Topic: Subreport to main
Posted By: adders
Subject: Subreport to main
Date Posted: 23 Jun 2014 at 11:31pm
Hi,

I have created a stock report which includes a subreport that sums the total distributor free stock. I would like to show this in the details row in the main report. I was going to use shared vars but if i'm correct the data will always show on the line below as the sum in the subreport is run after the details line of the main report.

Is there away to get around this?

Many thanks

Ad



Replies:
Posted By: kevlray
Date Posted: 24 Jun 2014 at 5:46am
You can get the results from a subreport in a section after the sub-report.  Thus if you put the sub-report in details A, the results would be available in details B.  Not that I would ever recommend putting a sub-report in the details section (performance suffers), but sometimes it is necessary.


Posted By: adders
Date Posted: 24 Jun 2014 at 6:18am
Thanks for the reply Kevlray.

Unfortunately this one does have to be run in the details row as its showing free stock from other customers which uses different parts. I didn't think it was possible to place the sum of a sub report in the details row of the main report :(


Posted By: kevlray
Date Posted: 24 Jun 2014 at 1:12pm
Yes it is possible, but you will have to use shared variables and multiple detail sections.  Also the section that the sub-report is in cannot be suppressed, but there is a trick to that also.


Posted By: adders
Date Posted: 25 Jun 2014 at 2:07am
Thanks for that. I have now separated the details line which has allowed me to pull in the figures from the sub report :) I have also placed a reset counter which works for all lines except one which is duplicating twice? Why would this occur with a reset counter in place?

Thanks Again


Posted By: adders
Date Posted: 25 Jun 2014 at 4:17am
All sorted, had it placed in the wrong group :)



Print Page | Close Window