Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Default Parameters in CR XI Post Reply Post New Topic
Author Message
PLTyler
Newbie
Newbie


Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
Quote PLTyler Replybullet Topic: Default Parameters in CR XI
     Posted: 05 Jan 2009 at 9:25am
Using the VB6 RDC and CR XI . . . .

How do I insert a default dynamic parameter like "ALL" or "NONE" etc so that I can program for this in the Select Expert?

For example, I have 2 fields - Donors and Countries.

If I want to know how much the "UN" has given to "Angola", with dynamic parameters, then no problem. But if I want to know how much the "UN" has given to "ALL" countries, or how much "ALL" donors have given to "Angola" then I have a problem!

There surely must be a workaround ??

Many thanks in advance!

PLT
Geneva - Switzerland
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Jan 2009 at 10:11am
If you do not want to or cannot add a record to your master list of Countries of "ALL" go to this link:
 
If you can add that record use the link for your select expert condtion to handle it.
IP IP Logged
PLTyler
Newbie
Newbie


Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
Quote PLTyler Replybullet Posted: 05 Jan 2009 at 10:42am
Thanks for the quick response.

This logic is certainly OK for static parameters where one can insert a default parameter such as "ALL" but I cannot see that it will work with dynamic parameters (which was the sole reason for upgrading to CR XI from CR 8.5).

In the dynamic parameter interface the "default" option is no longer available.

PLT

Edited by PLTyler - 05 Jan 2009 at 10:43am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Jan 2009 at 11:11am
You can use it for dynamic parameters as well although I am not sure how to set it up as a default. I tend to use "...All" rather than "ALL" and then sort the list ascending so it is always the first item in the list of options. The "..." makes it first regardless of how many other items in your list start with an A.
IP IP Logged
PLTyler
Newbie
Newbie


Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
Quote PLTyler Replybullet Posted: 05 Jan 2009 at 12:37pm
Will try out your suggestions soonest. Its late now over here in Switzerland!

Many thanks again.

PLT


IP IP Logged
PLTyler
Newbie
Newbie


Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
Quote PLTyler Replybullet Posted: 06 Jan 2009 at 2:14am
Hi again DBlank,

Your logic is sound although I did get errors when I followed your code example - probably table/field naming. But how much overhead delay will this approach give a user with, say, 8 dynamic parameters querying a large SQL Server database over a network I wonder?

In the meantime I am experimenting with something rather more 'rough and ready'. I have found that the dynamic prompt '...' is actually a blank space - not a null nor an ellipsis. So instead of embedding and testing for "...All" I can test for space(1).

So far so good and it will make it a lot easier to upgrade 80 existing CR 8.5 reports replacing "ALL" with "space(1)" in the Select Expert.

If you can see any obvious drawbacks to my approach I will interested to hear from you.

Lastly, I am now faced with the problem of coding for the "startswith" option - which I use extensively as all the dynamic parameter prompts are discreet values and one can no longer enter a single character ???

Thanks again for your help and advice!

Peter Tyler
Geneva - Switzerland
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