on 02-05-2014 12:13 PM
Friends,
I have a report in which i am dynamically generating the pay codes and the respective amounts column-wise. The point is I could not accomodate all the columns in a single page so I want the split up the columns into multiple lines.
For example, I have different employees and I would want to show the pay codes under each employee number with the amount in a cross-tab. If the no. of columns exceeds 10, then I would want to show the remaining columns into the next line and so on.
Example:
-------------
Employee: 1001
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10
100 100 100 100 100 100 100 100 100 100
PC11 PC12 P13
100 100 100
Any help is appreciated.
Thanks & Regards,
Karthikeyan.G
Finally, I have found a solution for this. The steps are as follows:
Create a command to dynamically get the no. of records returned by the query
<select count(paycode) RECCOUNT from paycodemstr>
which are then placed in the cross tab columns. For example, if there are 20 pay codes available in the PAYCODE MASTER table, then the query will return 20 which will then be shown in the cross-tab columns with the respective amounts.
Create three formulas
1) EachPayCode:
Global Numbervar Recno;
WhileReadingRecords;
Recno := Recno + 1
2) GroupPayCode:
EvaluateAfter ({@EachPaySumGrp});
Global Numbervar Recno;
int((Recno -1) / 15);
// Replace 15 with the actual no. of columns required in a line so that the remaining columns will be continued in the next line and so on
3) Reset
Global NumberVar Recno;
if {@EachPayCode} = {PSGCOUNT.RECCOUNT} then
// PSGCOUNT.RECCOUNT is the no. of rows returned by the query used in the command object
Recno := 0
else
Recno;
Create a group Employee as the cross tab to display the list of paycodes in a cross tab by employees
Create a group with the formula field GroupPayCode
Create another group under GroupPayCode based on employee again and place the cross tab into this group header
Now, the report displays the paycodes with the amount in columns and automatically wraps after every 15th column in the cross-tab for every employee in the expected order.
Create a cross tab and add the field paycode into the columns.
Place the cross tab into the
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.