Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subreport Links Post Reply Post New Topic
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Subreport Links
     Posted: 26 Nov 2014 at 6:11am
Afternoon all,

I am experiencing a really strange issue, relating to Subreports and the linking options available. I've got two Databases (completely separate) and the results when looking at Subreport links are very different.

Database one

I have setup the subreport to hold all data (list of all system names) and have then setup a link from the Main Report to Subreport (MR.SystemName --> SR.SystemName) which then only shows the system names I have chosen in the main report.

Database two

When I do the same above but on this database the filtered data duplicate for every entry that there is in the Subreport. For example; if there is 30 system names but, using the Subreport link, I select only one name to display - that system name will then duplicate 30 times.


This is really strange and I cannot figure out why the second database is doing what it is. My end goal is to hopefully have multiple subreports for both databases and control the conditions from the main report for both Databases.


Any help appreciated.
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Nov 2014 at 6:54am
are you placing the subreports in the same locations within each report?
If you place it in the report header or footer it will run once per report.
if you palce it in a  GH or GF it will run once per group instance, in details runs once per executed detail row.
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 10:27pm
Thanks DBlank - that's very interesting, for two reasons...

1) I thought I'd tried putting the Subreport in the Report Header (obviously not!)

2) The subreport for Database one is in the details section but does not duplicate - what you have said makes sense but I would have thought this should be duplicating??
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 10:48pm
Hi Dan,

One other thing; your help has been excellent and, as a result, I have been able to build the report I wanted.

At the moment I have multiple subreports (some for Database 1 and some for Database 2) and am using Links on the subreports to control the data from the main report.

To do this I have had to include the two databases as separate entities, as they have no common fields, which obviously introduces multiple start points.

This works but is there a better way of doing this as Crystal tells me this way of doing things isn't supported....
IP IP Logged
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