|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Save Summaries–Save TimeRecently we found a report that required 30 minutes to process a large volume of data. But we wanted to view the report on a Web server, and that was far too long to wait for a Web page. Saving data with the report helped, but the report still took over 5 minutes before it displayed in the browser. Then we saved the summaries in the report, and the report is now instantly displayed. In addition to saving your summaries, you can summarize them. Really. To do this, you must use the Three Formula Technique. This technique uses a variable to accumulate the correct total. You use a reset formula in the higher level group header, a calculate formula in the lower level section, and a display formula in the group footer. What about using summary functions in a formula? The summary functions in a formula are usually applied to calculate grand totals or a group subtotal. You can also use them on an array.
The array can be any variable type, but the summary must be valid for that type. For example, you can Count or find the Maximum of a date array, but you can’t sum or average the array. There is a comprehensive list of summary functions available. You can use Sum, Average, Count or any of the other summary functions to achieve your purpose. If you combine this feature with the “Split” function to break a long string up into smaller array elements, then you have a powerful analysis tool available. You should also consider how you merge fields into a text object. The ability to merge fields into a text object has been around for many versions of Crystal Reports. You can use this merging to design sophisticated mail merge reports. You can drag database fields, formulas, parameters and all the other objects from the field explorer into a text object. Be careful if you drag a summary field from a different section. Summary fields calculate their summary at the group level at which they are placed. But if you drag the summary directly from one group section into a text object in a different section, then the level of the summary is retained from the original section. This applies to Crystal Reports version 9, 10 and XI. Crystal Reports 8.5 and earlier will change the level of the summary when dragged from another section. If you want the summary to be for the level you have the text object in, move it to that section first. Then within that section insert the summary inside the text object. There may be a reason why you deliberately want a summary in one section to appear in another section. Normally you need a formula to do this. Using a text object could be a faster way to achieve the same result.
This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects. |