Differences

This shows you the differences between two versions of the page.

Link to this comparison view

setting_default_values [2019/01/17 09:04]
setting_default_values [2019/01/17 09:04] (current)
Line 1: Line 1:
 +===== Description =====
 +
 +
 +
 +Even though the default values in Crystal Reports are all replaced by Control, the default values for Crystal Reports can make a HUGE difference in report speed with the DLLs currently used by Control to open them.
 +
 +
 +
 +When opened, reports pull the data from the database using the default settings **several times** in the process of Control setting the variable values. As such, the entire report will generate much more rapidly if the default data produces no reports. The difference in report generation time goes from minutes to seconds when this is done.
 +
 +
 +
 +===== Recommendation =====
 +
 +
 +
 +Cyrious recommends setting the default values of all reports as follows:
 +  * For Dates, make the Start Date 1/1/1990
 +  * For Date Ranges, make the Start Date and End Date 1/1/1990.
 +  * For numbers, make the default value -100.
 +  * For number ranges, set an empty range.
 +  * For text fields, set the value to "ZZ".
 +  * For text ranges, set an empty range.
 +  * For bit fields, try to choose the setting that will generate the least data. If not sure, set to false.
 +
 +
 +
 +===== Example =====
 +
 +
 +
 +In this example, we'll open a Crystal Report and edit the EndDate parameter to remove the pre-existing defaults and enter our new default value. 
 +  - Open the Crystal Report you wish to modify.
 +  - In your Field Explorer, expand the Parameter Fields list and click on the parameter you wish to modify the defaults on. In this example, we'll click on **fx_RangeEnd_Date** as this is the parameter responsible for passing the date settings into the SQL query that provides the data for this report.
 +
 +
 +
 +<html><div style="margin-left: 20px;"> {{::crystal_parameterlist.jpg?nolink&|}} </div></html>
 +  - You'll notice in the image below that there are 3 pre-existing date ranges available that need to be removed to increase the performance of the report.
 +
 +
 +
 +<html><div style="margin-left: 20px;"> {{::crystal_parameter_incorrect.jpg?nolink&|}} </div></html>
 +  - Click on each of the dates listed under the Value column then click on the X button to remove the pre-existing date. Once all are deleted click "Click here to add item" to specify a new date of **1/1/1990 12:00:00 AM**.
 +
 +
 +
 +<html><div style="margin-left: 20px;"> {{::crystal_parameter_enddate_correct.jpg?nolink&|}} </div></html>
 +  - Repeat the steps above for the other date parameters on the report, in this example we would want to make sure the **fx_RangeStart_Date** is corrected.
 +
 +
 +
 +====== Backlinks ======
 +  * [[include_componentbacklinks|include component="backlinks"]]