|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Calculate Inside a CrosstabYou can calculate inside a crosstab Crosstabs are excellent for summarizing a large block of data into a concise grid. We have developed some useful reports with the crosstab as its primary object. Usually you use a crosstab to sum or count a field in the grid. You have all the other Crystal Summaries available like DistinctCount, Maximum, Minimum and all those statistical functions. There is something else you can do, as well. Ken Hamady has developed a technique to perform calculations on the crosstab fields themselves. He makes particular use of the "DisplayString" property that appeared in Crystal Reports 9. (This technique requires version 9 and later). You need a summary for each field, and for the calculation you want to add to the report. In the example below this article text, we have calculated the value of each sale (in blue) and the Retail value of the sale (in black). The third summary is a copy of the Retail value and this is the value we are going to format. On the first summary, we used conditional formatting to set the color to blue and to save the field value in a global variable. The conditional color formula is" WhilePrintingRecords; Global Numbervar SellValue:=CurrentFieldValue; Blue The third summary field uses conditional formatting to change the display value. Set the Display String property using a conditional formatting formula of WhilePrintingRecords; Global Numbervar SellValue; ToText(CurrentFieldValue - SellValue) There could be some risk of confusion in using this technique because the formula in the cross tab does not reflect the final displayed value. We need to remember to look at the format property of DisplayString if not understanding where a value comes from. This example might be simpler than your real world requirements. You could solve this problem using a formula to calculate the discount on each sale, and then accumulate that formula in the third summary. If your calculations use addition or subtraction, then we would recommend you take that approach and use a formula. But if you want to calculate a ratio, multiplication and division require these variables and the display string approach.
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. |

| Keep track of your cross-tabs with
Report
Analyzer "Report Analyzer does it all. This is the best Crystal Reports 3rd party application on the market today! The numerous features combined with great performance makes Report Analyzer the ultimate documentation and analysis tool." -- Brian Kuipers, CrystalInfo.Net, USA Report Analyzer is the ultimate documentation and analysis tool for Crystal Reports users and developers. With a comprehensive library of analysis and documentation reports, Report Analyzer provides you with complete documentation, analysis, and performance suggestions for your Crystal Reports projects. Keep your investment in Crystal Technology at its best performance using Report Analyzer! How does Report Analyzer Work?Report Analyzer connects to your local Crystal Reports or Crystal Enterprise APS servers and imports their design definition into a documentation database. These imported reports are organized into documentation groups within the database to organize your information for easy referencing and reporting. How can Report Analyzer help you?Report Analyzer now comes in two editions -
Standard and Enterprise (click
here for Enterprise features). Improve report performanceReport Analyzer automatically detects potential performance issues in your report design settings, including record selection formulas, grouping options and database options.
Improve report reliability and maintenanceReport Analyzer documents over 30 design and style settings.
Speed development and maintenanceYou can easily view dependencies between report objects such as formulas, SQL expression fields, parameters, and database fields with the dependency viewer. Additionally, the powerful query feature lets you view dependency information across reporting projects.
Project ManagementReport Analyzer generates comprehensive documentation of your reports, with over 100 presentation quality reports. Complexity metrics assist with test case planning and maintenance estimates.
|