Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Change report structure depending on conditions Post Reply Post New Topic
Author Message
Joel Overbeck
Newbie
Newbie


Joined: 05 Mar 2009
Online Status: Offline
Posts: 2
Quote Joel Overbeck Replybullet Topic: Change report structure depending on conditions
     Posted: 05 Mar 2009 at 11:10am
I have to do the following for a job and I'm not even sure if it's possible:

I only have access to a .rpt file, so I can't touch either the VB 6 code that launches the .rpt nor Oracle. Apart from several other problems regarding fields that this job would have, I'm supposed to print a bill with a subreport in case the date of the bill doesn't match a certain date when they change some prices, and to use another subreport with two columns in case the prices change (in one column would appear the part of the bill with the former prices applied and in the other with the new ones). I have been told that it absolutely must be done in the same .rpt, because they print a thousand of them at the same time. Is this possible? If it is, how could I do it?

I must mention that I have to use Crystal Reports 5, although I'm not sure if this is possible even in later versions.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2009 at 12:57pm
Never used V5 so I don't know about that part but you can create both report options and conditionally suppress one or the other on the bill date criteria you mentioned. Although given your description the only difference in the 2 sub reports is that one has an extra column if the bill date is => a specific date. You could just conditionally suppress / show those fields based on the date rather than bog the whole thing down by running the report twice...
IP IP Logged
Joel Overbeck
Newbie
Newbie


Joined: 05 Mar 2009
Online Status: Offline
Posts: 2
Quote Joel Overbeck Replybullet Posted: 05 Mar 2009 at 2:22pm
I read about supressing, but it doesn't seem to be an option in CR5. I might be mistaken, though. The version with two columns has basically the same structure than the one column version, but each column only takes in account the billing information for the time period with a certain price.

Thanks for answering. I'll have to look into this more, because I don't have a lot of experience with subreports and even less with supressing parts of them.

The report includes other instances of the same subreport that must take into account if the same fields have a different condition, but I guess that might work as another subreport copied from its "parent".

Anyway, thanks for your help.


Edited by Joel Overbeck - 05 Mar 2009 at 2:24pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2009 at 2:31pm

Conditionally suprressing is very easy (at least in later versions) so you should have very few problems with it if the version supports it.

Good Luck.
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