Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: custom value option with Dynamic parameter Post Reply Post New Topic
Author Message
andrewsimon
Newbie
Newbie
Avatar

Joined: 28 Jun 2011
Online Status: Offline
Posts: 26
Quote andrewsimon Replybullet Topic: custom value option with Dynamic parameter
    Posted: 16 Sep 2012 at 2:51am
Hi,
 
  I want to add custom value option for dynamic parameter like what we have in static parameter. How can i do this. I cannot findout that option with Dyanamic parameter options.And also dynamic parameter seems to be slower than static parameter. Which one is more applicable ??
 
Thank you.


Edited by andrewsimon - 16 Sep 2012 at 2:55am
bbbbb
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Sep 2012 at 4:10am
Dynamic parameters read from the database, so they're always slower than static parameters.
 
The trick with dynamic params is to include a separate table (or in your case, a command) that provides data for the lookup for the param - don't pull the data from the tables used in your report and don't join the table that feeds the param to any of the other tables in the report.  Crystal will complain about this, but it's ok.
 
To include, for example, "All" at the top of the list for your param, I would create a command (SQL Select statement) something like this in the Database Expert:
Select '*All' as Value, '*All' as Display
UNION ALL
Select Field1 as Value, Field2 as Display
from MyParamTable
order by 2
 
Putting the "*" at the beginning of "All" ensures that it's always the first row in the lookup.
 
-Dell
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.