|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Use the Share UFL to Improve Report PerformanceThe following example illustrates how you can use the Share User Function Library to improve the performance level of your reports. And that can reflect well on your own performance report.
A local user had a report that reads from a large, slow, file-based database. A subreport in the details section calculated a summary from a large transaction table for the product in that section. We modified the report to use one subreport in the Report Header section to calculate the summaries for all the records in the transaction table. We saved those summaries using our Share User Function Library, and then retrieved them in a formula in our details section. As the share file is built in memory prior to writing to disk, it was still there when the details section were processed. So the retrieval of the summaries was at memory speed rather than database speed. The transaction file was processed only once and the full report ran several hundred times faster than the original subreport based solution. User Function Libraries are installed on the machine running the report and accessed in the Formula Editor.
See the Share User Function Library here.
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. |
Other Uses for the SHARE UFLHow often have you wanted to take a value from one report and use it in a second report? Now you can.
A couple of neat tricks:
And, there are many more ways to use the Share UFL to put your Crystal Reports system on steroids. Share data values between Crystal Reports with Share UFLWe have received requests in the past asking how to use value from one report in a second report. The usual answer is to repeat the database processing in a subreport inside the second report. This is highly inefficient of course, and hits major limitations if there are values needed from more than one report in a later report. Another solution to this is to calculate the totals in some summary tables, and use them there. That's fine if SQL functions will do what you want, but the values could be more complex than some simple SQL functions. In the past, we made this possible via using our Disk Output Library and Text Lookup User Function Library: write the values to a disk file using the DiskLinesEntry function, and retrieve it with the TextLookupCell function. We decided to combine these into an easy-to-use User Function Library that you can access under "Functions" in your Formula Explorer. The result is the Share UFL. To use this powerful tool, you create a Share file and a tag for the value you want to save with the ShareTagStore function:
Retrieve the value in another report with:
You can use multiple Share files in one report, and in the full version up to 1000 different tags for the values you want to save. |