Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Selection not working 8.5

Status
Not open for further replies.

justauser2004

IS-IT--Management
Mar 12, 2004
10
US
I have a report that prints out the records within a a date range when the selection criteria is set-up for the speciifc dates. I would like to compile and distribute the report and allow people to select their own date ranges for this particular field. I deleted the selection record for that field and added a parameter. I named the parameter and selected Range Values and went into the Set Defaults Values to identify the table and field the values would be coming from. I saved the parameter and inserted into the header of the report. When I run the report, I get all records-so not filter was set.

Based on this limited info, any thoughts on why I cannot create a working parameter but a criteria set up as a selection criteria works? I am stumped......

Thanks!
 
Not enough detail so I am guessing

Crystal version
Database/connectivity used
Example data
Expected output

I would create two parameters, {?StartDate} and {?EndDate} with date as data type. Since you mentioned date fields, I assume that is Date instead of DateTime


Add the following statement to your Select Expert/Records Selection

{table.datefield} in {?StartDate} to {?EndDate}//substitute your own field name for {table.datefield}


 
You created the parameter, but did you add it to your selection criteria?


{table.datefield} = {?DateRange}
 
Sorry about the lack of detail. I will try your suggestions. To answer wichitakid, cr 8.5, ODBC connection, data would include posted date of an invoice, job number, shipping date adn a column that displays the calculated days between shipping and posted invoice date. The preferred record selection is on the posted invocie date-so people would run the report to display activity for the prior week given the posted invoices in the date range put into the parameter dialog box. Once I added the parameter and deleted the selection criteria, the report gave me all invoices in the system-for all jobs. So, the report went from about 15 records to one with thousands.

To answer dtempleton, I did add the parameter but did not recreate a selection criteria. I created the parameter then placed it in the page header of the report. When I ran the report, the parameter dialog box appears and I requested the information for just one month(entered date of beginning of month and entered date of end of month).

I will try the suggestions. Stay tuned and thanks for your responses!
 
Just adding the parameter to the header will not change the selection criteria. It MUST be added to the selection criteria.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top