Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Default Values Issue Post Reply Post New Topic
Author Message
mjoshi2978
Newbie
Newbie
Avatar

Joined: 14 Sep 2009
Location: United States
Online Status: Offline
Posts: 9
Quote mjoshi2978 Replybullet Topic: Default Values Issue
     Posted: 15 Sep 2009 at 12:34pm
Hi Guys,
 
I am back again with few more issues that I am facing currently. I am having a parameter field of "string" type with "dynamic" values that are coming from columns of a table. User inputs the value for the parameters by selecting it from a dropdown. As it is dynamic, it is but obviously going to be a dropdown select list.
 
I have few concerns regarding this parameter. At first I would like to select multiple values and not one. Those multiple values selection should also be random. I hope you can get the idea of it. I would like to do the same sort of functionality as we do it with normal dropdown combo box on a web page i.e. press "Ctrl" key and select the multiple values randomly from the drop down. I know crystal does not support doing this but still would like to give it a shot if somebody might have worked on it. I tried using range of values like "From" and "To" but it gives the output like between those from and to values.
 
Other issue is I want the report to run and displya results like passing "no value", "blank" or "Null". I know that Crystal generates the dynamic parameters drop down from all distinct field values that it evaluates thru from the table and there is no facility like "Select All" or "None". So I tried a workaround by putting an additional value in my table with a hard coded value like "Select All". I am able to get that value in the list too. But now my question is how to make that as a default value when user plans to preview the report. Say like when user loads the parameter page for selecting the filter criteria, the value visible in the drop down should be "Select All". How can I work this out?
 
Please try to respond it asap as my manager is on the top of my head and this is a burning issue that we are facing since long...
 
Thanks in advance for all your response...
 
MVJ
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Sep 2009 at 1:54pm
you can use a Command object to add an All or None to the parameter list.  You can also use a multiselect box so that you can select at random...the ctrl and shift might not work...I haven't used Crystal Parameters in years...my company builds its own parameter input screens that are more user friendly than Crystal's. 
 
Last if you get the data from a stored proc, it can respond to the All better than Crystal, but you lose the multi select since Crystal stores that basically as an array that you can check using an IN statement.
 
HTH
IP IP Logged
mjoshi2978
Newbie
Newbie
Avatar

Joined: 14 Sep 2009
Location: United States
Online Status: Offline
Posts: 9
Quote mjoshi2978 Replybullet Posted: 15 Sep 2009 at 2:53pm
Thanks HTH for responding my question.
 
How do I go by adding the command object? I am using CR 11.5. Can you detail me the steps to add on a command object on an existing report? After adding command object how to link the same with parameters? How can I get to multiselect box in CR 11.5?
 
 
 
MVJ
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Sep 2009 at 6:48pm
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=5050
 
In your param the options on the bottom of the set up screen there is an Allow multiple values. Set that to True.
IP IP Logged
mjoshi2978
Newbie
Newbie
Avatar

Joined: 14 Sep 2009
Location: United States
Online Status: Offline
Posts: 9
Quote mjoshi2978 Replybullet Posted: 17 Sep 2009 at 4:01pm

Hi DBlank,

At first, thanks for assisting me with this issue. I really appreciate it. Now, as far as my knowledge is concerned, allow multiple values will give values in a list panel and those which I need to add as my criteria will have to be selected. Once selected with all the values one by one, once I press "OK" it will display the matching records. Now my concern for the user here is they dont want to first search from the entire list one by one and then select them and its really a big hectic job when searching from 1000's of rows from the list panel one by one.  Moreover if this is the case then they are far more comfartable to input the values directly with "," separated format rather than doing time consuming one by one select. If you have some feasible and more effective solution then please let me know.

Thanks for all your time and help...
 
 


Edited by mjoshi2978 - 17 Sep 2009 at 4:06pm
MVJ
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2009 at 5:23pm
I do not have crystal in front of me so canont test at the moment but I am pretty sure you can use allow multiple values as true with static params (you type it in) as well as dynamic params (select from a list as you were describing).
Assuming I am correct will your users be ok typoing and hitting OK instead of using commas. It will be much easier to use that in the select statement. Parsing it back out intao an array would be a pain.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 Sep 2009 at 6:09am
You don't need to parse the entries into an array if you don't want to.  It all depends on how you want to handle and what form the parameter is in.  If it is something that depends on spaces, it would be harder, but if it is number that are comma delimited you could remove all spaces in the string, add commas to the front and end and then check using instr if the parameter matches the record.
 
OR you could get the data via a stored proc and build a function to parse delimited strings (this is actually the approach I took as the client wanted to enter dept codes like this: 1-5, 10-26).  The function would return a table that the stored proc can search through, join on, etc.
 
My experience with multiple selects is a list on one side and selecting them into a list on the other.  You might be able to add your own entries as DBlank suggests, but the risk, of course, is a mistyped entry.
 
I agree that a long list is cumbersome to use, which is why my company moved away from using the Crystal parameter screen, because it is cumbersome and not very flexible.
 
Hope some of this helps
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