Print Page | Close Window

Entering Parameters

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
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=1921
Printed Date: 18 May 2024 at 8:02pm


Topic: Entering Parameters
Posted By: Bman
Subject: Entering Parameters
Date Posted: 20 Dec 2007 at 2:03pm
I'm working on the parameters (chpt 05) and I can't seem to get the program to prompt me for parameters unless I drag the parameter from the Field Explorer to the report. Then all it does is display the text that I select and display it on the report form. I have created the parameter and set the default values for Employee Position from the xtreme database.I'm trying to get the report to filter the output according to the parameter that I select. Page 93 of the book says "When a report has parameters, the user is prompted to enter values when the report is run". I find this not to be the case. I don't get prompted until I drag the parameter onto the report.
For example;
I'm trying to create a parameter for Employee Position that will filter the report's output according to the postition that I select. I created a parameter for the report called 'Position' and set the default values.
 
How do I get the program to prompt me for a parameter without dragging and dropping the parameter onto the form?
 
How do I get the program to filter the output according to the parameter that I select?



Replies:
Posted By: BrianBischof
Date Posted: 20 Dec 2007 at 2:25pm
You are only prompted for a parameter if Crystal Reports needs the parameter to generate the report. Thus, that is why you only get prompted if you drag and drop it onto the form. You certainly don't want to get prompted for parameters that haven't been used yet.

From your question, I'm thinking that you created the parameter properly, but you haven't included it in your record selection formula yet. You need to set up the report so that it only prints records when a certain field matches your parameter value. Look at Chapter 6 and at the very beginning it tells you how to do this. Read through to Figure 6-3 and this is where you select the parameter that you created.


-------------
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: Bman
Date Posted: 20 Dec 2007 at 3:33pm
Thanks for the quick response. I got it working now. Have a good one!
Bman



Print Page | Close Window