Note that there are some explanatory texts on larger screens.

plurals
  1. POCrystal Reports report formatting across different pages
    primarykey
    data
    text
    <p>I have a question about Crystal Report. I have an existing report, with its data taken from a stored procedure. The data may look like this:</p> <pre> Division|Group Level 1|Group Level 2 |Group Level 3|Value --------+-------------+-------------------+-------------+-------- IT |Assets |Current Asset |Cash |100 CORP |Assets |Current Asset |Cash |200 IT |Assets |Current Asset |Receivables |300 CORP |Assets |Current Asset |Receivables |400 IT |Assets |Fixed Asset |Land |500 CORP |Assets |Fixed Asset |Land |600 IT |Liabilities |Current Liabilities|Wages |100 CORP |Liabilities |Current Liabilities|Wages |200 IT |Liabilities |Current Liabilities|Taxes |100 CORP |Liabilities |Current Liabilities|Taxes |100 IT |Liabilities |Long-Term |Bonds |300 CORP |Liabilities |Long-Term |Bonds |400 </pre> <p>The actual data may have many more divisions (not just two). In the new report, I want the report to look like the following:</p> <pre> | IT | CORP Current Asset Cash | 100 | 200 Receivables | 300 | 400 Total Current Asset | 400 | 600 Fixed Asset Land | 500 | 600 Total Fixed Asset | 500 | 600 Total Assets | 900 | 1200 Current Liabilities Wages | 100 | 200 Taxes | 100 | 100 Total Current Liabilities | 200 | 300 Long-Term Bonds | 300 | 400 Total Long-Term | 300 | 400 Total Liabilities | 500 | 700 </pre> <p>So, the report will be expanded to the right, according to the number of divisions. Assume that one page can hold up to 10 divisions. Then if there 15 divisions, then the first page will show division 1 to 10, the second page will show 11 to 15. The items shown on the first and second page will be the same, just for different divisions. The number of divisions are flexible. And also the items are quite a lot (there can be a lot of current assets, liabilities, etc).</p> <p>For now, I tried to do some formatting in the stored procedure, so the returned data will be like:</p> <pre> Page No | Group Level 1 | Group Level 2 | Group Level 3 | Div 1 | Value 1 | Div 2 | Value 2 --------+---------------+---------------+---------------+-------+---------+-------+-------- 1 | Assets | Current Asset | Cash | IT | 100 | CORP | 200 1 | Assets | Current Asset | Receivables | IT | 300 | CORP | 400 </pre> <p>and so on. For division 11 to 15, I set the page no to be 2. And then in the Crystal Report, I will group by : Page No, Group Level 1, Group Level 2, and Group Level 3. So the Crystal report will show everything on a page based on the page number.</p> <p>The problem is that:<br> - If there are a lot of items, then it may not fit in one page as well. For example, assume one page it can fit up to 30 lines, then if I have 40 lines, the 10 lines will be shown in the second page. But I want the second page to still show the first 30 items for division 11-15, and the third page will show the last 10 lines for division 1-10, and the fourth page will show the last 10 lines for division 11-15.<br> - The running total in Crystal Report will be reset on each change of the group. Let say I have 40 assets. Then after the 40 assets, which is on the third and the fourth page, it should show the total of the assets. How do I calculate the running total so that it shows up correctly? (Considering I can not just sum it up directly, as third and fourth page should show the total of different divisions).</p> <p>Is there any solution for this problem or a better approach to format the data?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload