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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Selection of Date Parameters

Status
Not open for further replies.

ksaab2002

MIS
Jan 6, 2005
66
US
Hello and happy Friday!

I am using Crystal 9, with ASP.net and SQL 2K. I have two sets of reports that are identical except that one set pulls (based on date parameters) a date range for invoices and the other set pulls based on a departure date range (also parameter based)..

Here is my question..is it possible to have the end user select which date range they want to see first then pass that info - along with the date parameter selections for
{?StartDate} and {?EndDate}- to display the info in ONE set of reports?

Please be detailed..I am fairly new to Crystal and using a new version..but I have been learning and applying tons of info from these forums to optimize and redesign the reports I need.


Many Thanks!

 
Your already have your date range parameter. Create a new parameter {?DateToReport} that allows the user to select either Invoice Date or Departure Date.

In your record select formula:
({?DateToReport}="Invoice Date" and
{table.InvDate} in {?DateRange}) or
({?DateToReport}="Departure Date" and
{table.DepartDate} in {?DateRange})

You might use a formula for your report title to indicate which version of the report the end user is looking at. Also you may want detail sections a and b if the report will show the different date fields depending on the parameter.

MrBill
 
I was surprised it worked so easily. I had started playing with it earlier and ended up with about the same solution. I am now going to make changes to all the reports to pare down to one set.

In terms of optimizing the reports..I am trying to rewrite as many IF...then formulas as possible as Switch formulas - to try to push record selection down to the server wherever possible..
Is there anything else that is recommended? I noticed an option for 'group on server' will this help speed up the reports?

Thanks very much for your response..
 
Group on server will help speed up the report, but only if there is no detail information being displayed on the report -- you can only pass summaries to the report.

The best way to speed up a report is to make sure that the record selection formula passes thru a complete SQL statement, as seen when you click on Database, Show SQL Query.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top