Fuck Off SubReports in Crystal Report
Summary:
When we were asked to do the integration job between BO and SAP BW, this kind of situation should be encountered 100%: more than one query need to be joined in the final report and the relationships between them are 1:n. Here is the trick to achieve that without Subreport which is a performance nightmare.
本文介绍了如何避免使用subreport,从而提高crystal report的性能。
关键词:撒泼 SAP BW Business Objects Crystal Report Subreport BI query
Sample:
We had a query including main information of the employee’s master data, for example, IDs of the employees. We stored the information of work experience in another query. For example, employee ZZ had two records in the work experience query. One is the job in Siemens and another is SAP.
We naturally consider using SUB Report in Crystal report to do this task. But let’s have a look at the data volume, a middle size INC or AG will have more than 10,000 employees working for them. We can’t let the Crystal report dynamically to read 2 or more queries during the run time. What is even worse, when you click the next page button in crystal report, it will try to access the query just in time.
Solution:
We have to find a way to get the data from BI queries for one time and print them in crystal report page just as we need.
Step1: Init variables to store strings – put this formula in DETAIL area of the report!
Step2: Construct the variables
Step3: Print them
Overview for the trick:
By ZZ