Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Display Parameter Field Values Post Reply Post New Topic
Author Message
andy@2mcctv
Newbie
Newbie
Avatar

Joined: 17 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote andy@2mcctv Replybullet Topic: Display Parameter Field Values
    Posted: 17 Jun 2009 at 9:36am
I have searched and not able to find my specific delima.
 
Have a parameter field that uses id number to pull data, have a description from another table for user to select from as they do not know the id's.
 
I would like to have a field that lists the names of the multiple parameters not just value. I can display the actual value using the following however would like to display the names.
 
local numbervar i;
local stringvar concate;
concate := "";
//loop through the multivalue parameter
for i := 1 to count({?Admin Name}) do
   //concatenate the current value to a string separated by commas. If it's the last value, don't add a comma. 
   concate := concate + totext({?Admin Name}) + iif(i = count({?Admin Name}),"",", ");      
concate
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2009 at 11:06am
I believe what you are looking for may be:
Join({?Admin Name},",")
IP IP Logged
andy@2mcctv
Newbie
Newbie
Avatar

Joined: 17 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote andy@2mcctv Replybullet Posted: 17 Jun 2009 at 3:36pm

?Admin Name array is a field AdminID so my array contains the numbers like 1,7,10

I am pulling from table based upon AdminID=?AdminName as this is the only field in my lookup table that associates back.
 
I would like to convert to show the name that is in the same table under Admin_FirstName field.
 
May not be a way to pull that and if not I can come up with some other workaround.
 
I guess no way to pull the description field from the parameter field?
 
Hopefully something available.
 
Thanks
IP IP Logged
Debbie Giles
Newbie
Newbie
Avatar

Joined: 16 May 2008
Online Status: Offline
Posts: 10
Quote Debbie Giles Replybullet Posted: 23 Jun 2009 at 5:41am
Hi Andy
 
Did you come right here?  I'm trying to do the same thing.
Debbie
Debbie Giles
Syspro Consultant
EOH
+27 21 525 7200
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 6:23am
If the parameter field is linked to the table, or if you use command object, in the select you could specify the description value, then, I would think as you cycle through the ids you could find the descriptions.  No guarantees, since I don't gather / use parameters in this manner for my reports.
 
I am kind of lucky, my shop has decided to create all reports using ADO.net with the parameters gathered through a 'wizard'.  Which in the end means that I passs the data and the parameters through to the report and display them.
 
Here is perhaps a more useful idea...loop through the records in the admin table.  If the id is IN {?Admin} add the correct field to the string...This seems more like what you are after.
 
HTH
IP IP Logged
Debbie Giles
Newbie
Newbie
Avatar

Joined: 16 May 2008
Online Status: Offline
Posts: 10
Quote Debbie Giles Replybullet Posted: 23 Jun 2009 at 7:08am

What I have done is, in SQL, I have concatenated the value and description with a - between them and have set up the parameter from that column and not the value and descrition seperately.  Now I can list them unsing the Join() formula, my next problem is that my Sales reports have 3000 customers and listing them in cumbersome...  now I have to get thinking about this one.

DConfused

Debbie Giles
Syspro Consultant
EOH
+27 21 525 7200
IP IP Logged
andy@2mcctv
Newbie
Newbie
Avatar

Joined: 17 Jun 2009
Location: United States
Online Status: Offline
Posts: 3
Quote andy@2mcctv Replybullet Posted: 24 Jun 2009 at 7:48am
No I was not able to make it work. I have it grouped by AdminID when it returns to the main report and have that showing a name without any problem, I just wanted to summarize and list the other.
IP IP Logged
Debbie Giles
Newbie
Newbie
Avatar

Joined: 16 May 2008
Online Status: Offline
Posts: 10
Quote Debbie Giles Replybullet Posted: 30 Jun 2009 at 1:51am
Hi, do a quick search on my question:" Multiple Parameter String" to see what we managed there.
 
Rgds
Debbie
Debbie Giles
Syspro Consultant
EOH
+27 21 525 7200
IP IP Logged
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.