Using date ranges in Crystal Reports with UniDevCo products.

To add date ranges to Crystal Reports that will pass the date range parameters through UniDevCo products, such as Crystal Launcher and Report and Inquiry Engine, use the following steps.  

  1. ACCPAC dates are numbers.

Example:  UXDETAIL.InvoiceDate

(Sales Analysis Invoice Date field) 

  1. Use pwFormatDate to display ACCPAC dates.

Example:  pwFormatDate ({UXDETAIL.InvoiceDate}) 

  1. Set date parameters. Parameters must be Strings.  See example screens below.

Example:  Parameter Fields for Starting and Ending Dates 

Name:  DateStart     

Value type:  String

Default value:  19900101

 Name:  DateEnd      

Value type:  String

Default value:  99991231

Do not select a table or field from the database on the Set Default Value screen.

 

  1. In record selection formula, convert string to number to pass parameters correctly.

 Example: {UXDETAIL.InvoiceDate} in ToNumber ({?DateStart}) to ToNumber ({?DateEnd}) 

  1. To display the dates in the correct format in the story block of the report, create formula fields for the starting date and ending date.

Example: pwFormatDate (ToNumber ({?DateEnd})) 

Crystal Launcher Example

 

 

 

 

or email info@unidevco.com with questions or comments about this web. Last modified: November 22, 2006 Copyright © 2000 - 2005 Uni Development Company Inc. All rights reserved.  All other marks are trademarks or registered trademarks of their respective companies.