Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: IF...THEN in Command WIndow Post Reply Post New Topic
<< Prev Page  of 2
Author Message
tigerlilly
Newbie
Newbie


Joined: 08 Feb 2011
Online Status: Offline
Posts: 9
Quote tigerlilly Replybullet Posted: 08 Feb 2011 at 7:41am
The subreport idea would work, but I don't benefit from that any more than just creating 3 seperate reports and publishing them out there.  From a management perspective, I would still have to add another report to the invironment if another report type is added.   The goal is 1 report using different SQL which can be changed when the prompt is selected based on the value the user enters.   Sub reports would require multiple reports developed just like I have now.
 
Thanks for the idea though.   I really appreciate each of you stepping up to assist.   That is very positive and a welcome sight!   :0)
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Feb 2011 at 7:44am

You can create 1 report and use it 3 times in the main report.

Each one would have a different source
and display or hide
IP IP Logged
tigerlilly
Newbie
Newbie


Joined: 08 Feb 2011
Online Status: Offline
Posts: 9
Quote tigerlilly Replybullet Posted: 08 Feb 2011 at 7:53am
I didn't know you could do that; very interesting idea.  I thought it would take 3 subreports in the main with 3 different datasources (total of 4 reports). 
 
Wouldn't that still be multiple (2) reports though vs. 1; the main and the sub?   Do you have to run a command on the main report to populate the subreports (link to them) or can you leave the main blank?  
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Feb 2011 at 8:09am
You do not have to link them if you do not want to. However if you are using any run time params other then the user picking which item they use then you will want to link using those params otherwise they will have to enter params for each sub report which is a pain.
You can build the sub report as you want it using ione source.
Then insert it in the the main report 3 times (each on its own header section)
Then in the 2nd and third version chaneg the source of these reports to use whatever you want.
Sounds like youa re using commands so you can just alter the command as needed, just make sure you do not change the structure or field names.
You would have had to do that in your other process as well.
The main report requires no building other than a run time param that defines display for one of the other 3 sub-reports.
IP IP Logged
tigerlilly
Newbie
Newbie


Joined: 08 Feb 2011
Online Status: Offline
Posts: 9
Quote tigerlilly Replybullet Posted: 08 Feb 2011 at 8:57am
Thanks for the input again.  I appreciate it.   I'll give it a try.  You take care and have a wonderful day.   :0)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Feb 2011 at 9:54am
param use in a command just posted today...

Edited by DBlank - 08 Feb 2011 at 9:54am
IP IP Logged
tigerlilly
Newbie
Newbie


Joined: 08 Feb 2011
Online Status: Offline
Posts: 9
Quote tigerlilly Replybullet Posted: 08 Feb 2011 at 11:19am
I tried something different to get away from IF...THEN, or CASE...modifying the WHERE to use OR conditions (X, Y, and Z), but that didn't work either.  Again, it does on SQL Server but the performance dropped off exponentially; query ran for 29 minutes in SQL Server before it displayed the dataset.   Prior to using this method, it took 2-3 minutes using the IF....THEN statement on the server side.
 
Even if it worked in Crystal, this modification just isn't going to cut it either...its way too slow and my user's aren't going to want to sit around waiting for 30 minutes for a report that used to take 3.   
 
Thanks for responding and trying to assist by sending me the link though.  I already knew that about the parameters and double-clicking....  I deleted the DECLARE statements (variables) awhile back and am just using references to the prompt {?ReportType}.   It didn't matter though...nothing works when using the {?ReportType} prompt. 
 
It should not take 16 hours to work on this issue when it's so damn simple in logic.  That shows how ineffective (or the lack of robustness) Crystal really is as a dynamic development tool. 
 
I am very disappointed in Crystal as a report development product, but what else is there really (other than Access which too has extreme limitations in performance and scalability).
 
Anyway...  I'm done bitching about this today...the frustration simply wore me out!  
 
 :0(
 
 
IP IP Logged
<< Prev Page  of 2
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.