Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
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!
Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
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.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
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.
Joined: 03 Jan 2009
Online Status: Offline
Posts: 24
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 ???
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