Print Page | Close Window

Parameter Description Issue

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2660
Printed Date: 08 May 2024 at 12:21am


Topic: Parameter Description Issue
Posted By: krpmsit
Subject: Parameter Description Issue
Date Posted: 20 Mar 2008 at 4:49am

Hi

I have created one parameter field on Crystal report X1. its a static one.
Value Part as "User ID" and Description Part as "User name".
 
For UI display we have set as "Prompt Discription only =True".
 
While i am calling this parameter in to the Report page, its showing the UserID only. But i need to show "User Name".
 
Kindly help me on this topic.
 
 


-------------
Regards
K. Rajapandian



Replies:
Posted By: BrianBischof
Date Posted: 21 Mar 2008 at 3:17pm
What you're doing is correct. I would make sure the report has a good connection to the database by doing the option Database > Verify Database.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: krpmsit
Date Posted: 24 Mar 2008 at 1:37am
yes, i checked that. Its giving the msbgox as "The Data Base is up to date".
 
Are we have any funtion to retrive the Description part of parameter?
 
Kindly help me on this topic
 


-------------
Regards
K. Rajapandian


Posted By: BrianBischof
Date Posted: 24 Mar 2008 at 3:13am
No, there is no way to get the description. I can't figure out why it won't display the description. Have you tried doing parameters with a test report (a very simple one). That might help to see if it is the data or Crystal Reports.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: kkcsrao
Date Posted: 24 Mar 2008 at 4:29am

Hi,

Always when you place a parameter field onto the report which has the description field(inspite of whether it is set to true or false), only the value of the parameter is displayed not the desc.
 
To display the description field
- Use the description( fieldname) in a formula like
if User ID = value 1 then Desc 1
elsif User ID = value 1 then Desc 1
else so on
But this is preferred for some small number of values or static parameters.
 
- Place the "User name"  field directly in the report where u have placed the parameter field. This will display the desc of the User ID what you have selected in the parameter.
 


-------------
kc


Posted By: krpmsit
Date Posted: 24 Mar 2008 at 4:44am
 i am not getting. Can u explain clearly and thanks for your reply.

-------------
Regards
K. Rajapandian


Posted By: kkcsrao
Date Posted: 24 Mar 2008 at 9:15pm

Hi,

I think, I have mentioned the things very clearly.
 
I have assumed the USER NAME field as a database field, which you have taken in the description field of the prompt. And I have also assumed that the parameter is not multi-valued.
 
Instead of placing the parameter i.e. USER ID(value) and USER NAME(desc) on to the report, put the USER NAME field directly onto the report.
So u ll get the required output.
 
 


-------------
kc


Posted By: krpmsit
Date Posted: 25 Mar 2008 at 12:22am
Hi,
Thanks for the reply. Let i explain you clearly.
 
Process steps:
 
1) Paramater Name called as "SalesManager".
2) Value part as "UserID".
3) Desc part as "UserName".
4) I am taking that userid and using in the report to filter the record.
5) I need "UserID as a Value part" and "UserName as Desc Part".
6) I need to show the "UserName" in the report page instead of "User Id"
 
I think now you are clear about my requirement.
 
Kindly help me on this topic. 


-------------
Regards
K. Rajapandian


Posted By: kkcsrao
Date Posted: 25 Mar 2008 at 2:24am
ok.
U create the parameter with what ever credentials u have mentioned
i.e. "UserID as a Value part" and "UserName as Desc Part".
But put the User name field (which u have selected in the description of the "SalesManager" parameter) into ur report where u want to display USER name instead of that parameter.
Hence when u select User Id 1 in ur parameter, User name 1 will be displayed accordingly.
(dont put the "Sales manager" parameter onto the report, put the "User name" field)


-------------
kc


Posted By: krpmsit
Date Posted: 25 Mar 2008 at 2:42am

Hi,

I have done, what ever you said. But Its not working. Its not bringing the userName. Its Showing all users but not selected users.
 
But i have done with SubReport. I have passed the userid to that sub report and i am displaying the username from parameter using query.
 
 
 


-------------
Regards
K. Rajapandian


Posted By: kkcsrao
Date Posted: 25 Mar 2008 at 3:02am
Have u done the select expert for ur "Sales Manager" parameter. If u dont do that then whatever u select in ur parameter, everything will get displayed

-------------
kc


Posted By: Soumya
Date Posted: 01 Dec 2008 at 12:30am
Can you please tell me how you achieved this. I have a dynamic prompt in the main report which has value as a number and the description as the name. The value is passed to the sub report prompt. I want to display the main report paramater's desciption in the sub report.  Is it possible at all? Thanks in advance for you help..


Posted By: krpmsit
Date Posted: 01 Dec 2008 at 8:11am
Yes, It's possible.
 
Step 1:
 
Create "Dynamic Parameter" as "Number" as Value and "Name" as Description on the Main report and call the Parameter on the main report.
 
Step 2:
 
Create one Subreport for showing "Name". This subreport for dedicated to show "Name" only. put query like "Select number, name from table"
 
Step3:
 
Create one "Static parameter" for "Number" in the Subreport
 
Step4:
 
Call the subreport in the main report and
Map Mainreport and subreport for that "number" field.
 
Step 5
 
Add "Select Expert" for that number field on the sub report.
example:
 "{Command.number} = {?Pm-?Select - number}"
 
Step6:
 
Place the "Name" field on the sub report and run the main report.
 
Select few names from the parameter and it will pass the "number" to subreport and the subreport will match with that and will show the name.
 
i hope, it will help you.
 
Regards
Pandian
 


-------------
Regards
K. Rajapandian



Print Page | Close Window