I have 2 row fields, ACCT.ACCOUNT_NUMBER and ORG.ORG_VAL.
I dont have any columns.
The summaries i am displaying are,
Count of Accounts - ACCT.ACCOUNT_NUMBER,
Count of Transactions - ACCT.TXN_VAL,
Sum of Amount - ACCT.ACCT_AM
I am sorting this cross tab based on the value provided in the parameter "{?STRORDER}".
If the value in the parameter is "TXN_DATE ASC" then i am sorting cross tab based on transaction date in ascending order.
If the value in the parameter is "ACCOUNT_NUMBER ASC" then am sorting cross tab based on account number in ascending order.
There are 6 sorting values,
TXN_DATE
ACCOUNT_NUMBER
DEPT_NO
EMP_ID
JOIN_DATE
LAST_UPD_DATE
So, i had to include the conditional formulaes in summary fields of crosstab.
i created formulaes like,
For Transaction date ASC
========================
{@TXNDate_Asc}
If
Instr({?STRORDER},TXN_DATE ASC')>0
Then
{Rpt.TXN_DATE}
For Account number Ascending
=============================
{@Acct_Asc}
If
Instr({?STRORDER},'ACCT.ACCOUNT_NUMBER ASC')>0
Then
{Rpt.ACCOUNT_NUMBER}
Then i inserted this formulaes as summary fields in cross tab. The summaries of this formulaes are getting displayed on the cross tab. But i dont need to display the summary of these formulaes. So i suppressed these summaries as i dont need it.
The sorting is working fine without any problem.
I have no issues with sorting.
The problem is with the blank spaces created in cross tab because of suppression. I want to avoid these blank spaces.
When i export the report in PDF, extra blank pages are created because cross tab is spread over multiple pages with blank spaces (suppressed summaries).
When exported to Excel, the required below summaries cell width is getting expanded.
Count of Accounts - ACCT.ACCOUNT_NUMBER,
Count of Transactions - ACCT.TXN_VAL,
Sum of Amount - ACCT.ACCT_AM
Hope this clarifies the doubt.