Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter Not Working Post Reply Post New Topic
Author Message
MikeC
Newbie
Newbie


Joined: 10 Jun 2008
Online Status: Offline
Posts: 17
Quote MikeC Replybullet Topic: Parameter Not Working
    Posted: 19 Jun 2008 at 8:31am

My next question:

My report is an employee listing with some wage information.  I pull the data from a SQL database-I created a view that pulls all the data from the various tables.
 
On my view and subsequently my report I have a field called home_dept that is a 3 digit number (such as 002, 005, 020, etc).  The values range from 001 to 099.  I am grouping employees on the report by department number.  Each employee has a value in the home_dept field.
 
The report is grouped by department number.
 
I'd like to create a parameter that allows the user to select a specific department or a range.  I've set up the parameter and added it to the report. 
 
When I refresh the report it prompts me for the parameters as I expect it to do.  But when it displays the report after the criteria is entered (departments 001 through 020 as an example) the report displays all departments, not the single department or range that was entered for the parameter.
 
Is there something else I need to do when I want to use the same field I'm grouping on as a parameter?
 
Any ideas or pointers are greatly appreciated.  Thanks!
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 19 Jun 2008 at 8:40am
Hi Mike,

You'll need to create a record selection formula - under report/selection formulas.

To return a single department the formula would look something like

{table.fieldname}={?parameter}

Formula will need to be modified if you are looking for a range of departments.

Hope this helps.

Sarah
IP IP Logged
MikeC
Newbie
Newbie


Joined: 10 Jun 2008
Online Status: Offline
Posts: 17
Quote MikeC Replybullet Posted: 19 Jun 2008 at 11:31am
Hi Sarah,
I owe you one.
 
You pointed me in the correct direction.  I created a group formula based on the info you provided.  Worked like a charm {AAIASALRPT.HOME_DEPT} = {?Department}.
 
Again, thanks!
 
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.047 seconds.