Totals in GROUP Left report [message #140298] |
Mon, 03 October 2005 09:19 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dev73
Messages: 12 Registered: October 2005 Location: B
|
Junior Member |
|
|
I have created a simple GROUP LEFT tabular
report using the wizard. I also made total of one column
at the end of each group through the wizard.
What I want is the Total line should only print when there
are more than one records in the group otherwise it should
not print. How can I do this.
Currently its printing like this (the dots are not part of report its just because this site doesnt recognizes spaces)
Dept No.......Emp No...Salary
1....................2..........200
.................total..........200....( i dont need this line)
2....................1..........200
.....................2..........200
.....................3..........200
.....................4..........200
.................total..........800
3....................7..........70
.................total..........70
-------------------------------------
What I want is that ignore total line for those
groups which have only one row.
Output should be like this:-
Dept No.......Emp No...Salary
1....................2..........200
2....................1..........200
.....................2..........200
.....................3..........200
.....................4..........200
.................total..........800
3....................7..........70
-------------------------------------
Thanks and Regards,
Dev73
|
|
|
Re: Totals in GROUP Left report [message #140313 is a reply to message #140298] |
Mon, 03 October 2005 14:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Steve Corey
Messages: 336 Registered: February 2005 Location: RI
|
Senior Member |
|
|
Create a summary column in the group EMP_NO. Set the function to COUNT. Name this column CS_COUNT_EMP.
Access the repeating frame properties of the frame that surrounds your TOTAL field and boilerplate. Click on 'Format Trigger'. Code the following PL/SQL:
IF :CS_COUNT_EMP > 1 THEN
return (TRUE);
ELSE
return (FALSE);
END IF;
Finito!
Cheers.
|
|
|
|