|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Web CrosstabWhat about processing a crosstab on a Web server? We’ve added this report to our Web demonstration with a simple page to ask the required questions, and then call the report. The easy way to get your Web page to send these parameters to the report is to create a form and some fields on your page and to name them prompt0, prompt1, etc. The individual fields must match the order in which the parameters are asked in the report. This makes a Web interface to your report very easy to implement. With a bit more ASP code, you could dynamically load the combo boxes with live data from the database.
On a related topic, you can calculate inside a crosstab. 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. |
Another optionAnother option is to use schedulers and viewers, which combine to make a cost-efficient desktop solution. About schedulersA scheduler is an inexpensive desktop solution for burst distribution of your Crystal Reports. Schedule your distribution, sending specific reports to specific lists at specific times, to improve the overall Business Intelligence function while reducing your own workload. Features
Uses
Benefits
|