Reimporting crystal subreports after copy to a different folder

I have an environment where we are developing reports for our WM software and we have Test, Train and Production systems.  When we develop a report it is done in the test environment.  After approval we copy to the train environment and then change all the data sources to point to the train environment.  Once approved, then we do the same to get it into the Production environment.  This works great for all the main reports.  The problem comes with the subreports.  Since crystal embeds the subreport into the main report, when i copy it to the next environment and then try to reimport the subreport it will look to the test environment for the subreport and then the data source is wrong.  How do I modify the main report so it can find the subreport in the new environment?  I have found if I delete a subreport from the test location and then reimport it in the main report it will have me search for the subreport as it does not find it because it does not exist after getting deleted.  This is not a very good way to do this so I am looking for a better way.  Please let me know how others handle this type of scenario.
LVL 1
Jeff GeiselmanAsked:
Who is Participating?
 
vetaldjConnect With a Mentor Commented:
Why do you need to reimport them? You can update datasorces for subreports from main report in same way as you do for main report. Did you try this way?
And, based on what you wrote - if you need to make change, looks like you need to go each step anyway...
0
 
Jeff GeiselmanAuthor Commented:
The reason is that I want the subreport file to reflect the correct data source and I don't really want to have to make the change in more than one place.  Also a subreport could change without the main report getting changed.  At this point then I need to reimport the subreport and it would be better to do that than to have to relink everything to the different environments just to get the subreport updated.
0
 
mlmccConnect With a Mentor Commented:
You really can't get around the issue of when you change the report and having to reimport it.


I am assuming the enironments are separate and you can't see the subreport from Test in the Train environment.

Do you have the environments setup so the directory structures are the same?

You may be able to get around this by having the subreport in the same directory as the main report.  Thus it may be able to find it when you need to reimort it.

At the very least you will always have to change the data source for the subreport and the main report.

mlmcc
0
 
Jeff GeiselmanAuthor Commented:
This is what I thought all along, but I was hoping for a different answer.  Thanks for the input.
0
All Courses

From novice to tech pro — start learning today.