Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sub Report relative paths Post Reply Post New Topic
Author Message
dunc
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote dunc Replybullet Topic: Sub Report relative paths
     Posted: 17 Feb 2010 at 9:16am
I'm using Crystal Reports 11 and have 2 reports that share a common sub report.

I have created a copy of the 2 reports and the sub report. I then edited the copied sub report and attempted to reimport the edited sub report into the 2 copied reports. However this action reimported the original sub report rather than the copied one.

How do you specify a relative path for sub reports linked to a report?

Thanks

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Feb 2010 at 1:43pm
What do you mean by import?
It is my understanding that a subreport is part of the main report.
if it originally was its own report and you use the 'Choose an existing report' when inserting a sub-report it makes a new version of this report as a subreport.Changing the orginal does no impact the inserted version.
So if you have:
Report A
Report B
Report C (used as a subreport via insert subreport, choose and existing report into reports A and B)
Making a change to C does NOT change the subreports in A or B.
Making a change to A's subreport does NOT impact B's subreport or C (and the same applys to altering B's subreport).
 
If you want to make a change you have to either
Change the subreport in Report A and then also make the same changes in Report B's subreport
or
change C, save it then open Report A, delete the subreport in it then use the insert subreport and reinsert it using the 'Choose an existing Report'.
repeat the process for Report B.
IP IP Logged
dunc
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote dunc Replybullet Posted: 18 Feb 2010 at 1:34am
By import I mean that from within the main report I right click on the subreport and select reimport subreport. Where does crystal reimport this information from? It seems to me that the following is happening.

I create reports A, B and subreport C as you describe.

I then copy the 3 reports to a new location. Lets call the copied reports X, Y and Z. I modify the subreport Z and reimport it into the two reports. At this stage I would expect the modified subreport  Z to be reimported but the original subreport C is reimported. Where is the link to subreport C stored? Can I change this to be a relative path?


Edited by dunc - 18 Feb 2010 at 1:36am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Feb 2010 at 8:10am
Sorry, don't know where the link is stored.
 
For the standard re-import process to work you have to both not have moved report C location and made any wanted changes to C (not Z).
Although you can have the changes made to C re-imported to the copied X and Y files.
If you need to use Z delete C from Xand Y and insert Z. That will reset the path to that file.
 
Anyone else know if that is file location is accessible anywhere?
IP IP Logged
dunc
Newbie
Newbie


Joined: 17 Feb 2010
Online Status: Offline
Posts: 3
Quote dunc Replybullet Posted: 18 Feb 2010 at 8:21am
I've found a solution of sorts. I've renamed C. Now when I reimport I'm prompted to specify the path of the subreport. This is still a bit clumsy but gives me the solution I want.

Thanks for your help
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