Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Selection Based on Detail 2

Status
Not open for further replies.

alembong

Technical User
Feb 16, 2005
18
US
CR XIr2
Oracle 9i native connection

I'm trying to create an exception report based on an existing report, and I think I'm getting stuck in the existing report's logic.

First off, the data is similar to this:
ID ORG Role
---------------------
Bob ALL BASIC
Bob ALL ENTRY
Bob ALL EDIT
Bob BGT BASIC
Bob BGT ENTRY
Bob BGT APPROVE
Bob FIN BASIC

The existing report groups by ID then ORG and I've created an array that lists the Roles in the Group Footer of ORG.

Bob ALL BASIC, ENTRY, EDIT
Bob BGT BASIC, ENTRY, APPROVE
Bob FIN BASIC

The exception report would essentially display the same way, but should only display the GF based on certain conditions. For the sample above, it should only show the line that has both ENTRY and APPROVE.

My first thought was just to conditionally suppress based on the array, but that would involve a lot of suppressing of the other groups as well.

Is there another way to do this? I thought that maybe it could do a group select, but I don't know how to do that based on an array. Any help would be greatly appreciated.
 
What do you mean by
My first thought was just to conditionally suppress based on the array, but that would involve a lot of suppressing of the other groups as well.
?

You could suppress the group footer with:

instr({@role},"ENTRY") = 0 OR
instr({@role},"APPROVE") = 0

...where {@role} is your display formula for the string.

-LB
 
Don't think you can do a group suppression using data from a dynamic array.

Just suppress the group footer in the section expert using boolean vars set on the fly

add this formula to details

@test

whileprintingrecords;

global booleanvar ENtry;
global booleanvar Approve;

If Role = 'ENTRY' then entry:= true;
If Role = 'APPROVE' then approve:= true;

In your Org group header

@reset

whileprintingrecords;

global booleanvar ENtry:=false;
global booleanvar Approve:=false

In the section expert suppression for Org footer

whileprintingrecords;

global booleanvar ENtry = false and
global booleanvar Approve =false

Ian

 
Thank you both. So far it looks like LB's suppression is going to work out, but I have a whole bunch more conditions to include so we'll see how that goes.

If not, I think Ian's solution will work and I think it might work out better in the end because I have some header information that I will need to suppress if none of the GFs for Org display. I wanted to be lazy and not have to create multiple formulas ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top