Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Subreport to main Post Reply Post New Topic
Author Message
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Topic: Subreport to main
    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
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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.
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet 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 :(
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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.
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet 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
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 25 Jun 2014 at 4:17am
All sorted, had it placed in the wrong group :)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.