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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing Details or distinct records???

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
US
I currently have a parent-child relationship report. I have a table named Workorder and an alias named Parent_Wo. In details, I am suppressing all Workorders that have the 'parent' checkflag = 'Y', so that the parent work order only shows up once in the report. The problem with this suppression is that I am suppressing all parents, even if they have children that are not in the workorder status that I am querying (so, meaning that a parent could be outside of a hierachy group if its children have a status that is say, not equal to WORKDONE). Maybe a way could be to select distinct records accross both tables and both alias names (parent_wo.wonum and workorder.wonum), if possible, so that I wouldn't have to suppress the details. The whole idea is to be able to have each parent-child hierachy in a group, and then have each stand-alone work order outside of the groups. Another way could be to suppress the details under the criteria that a workorder# outside of a group does not = a workorder# inside of a group. This is hard to put into words, but any help would be greatly appreciated.
 
It isn't entirely clear what you are trying to do...

An example of data and expected report would help.

As I see it you have a table and an aliased table joined on some field (Workorder number?)..

WorkOrder Parent_WO

Number -------> Number
checkflag checkflag
field1 field1

You say you are suppressing details if
Parent_WO.Checkflg = "Y"

Why not have this condition in the Record selection to eliminate the record altogether?

Also there is more to this then what you are telling us since the tables are identical...so there are more tables involved since the data is identical in both tables you have given..I don't see the point for the Alias

Describe your reporting problem a little clearer





Jim Broadbent
 
I have two tables: WORKORDER and its alias WO_PARENT. They are joined by a left outerjoin from WORKORDER.PARENT to PARENT_WO.WONUM. The report is grouped by WORKORDER.PARENT. Each child work order has a designated parent, however, there are workorders that are not parents or children. My record selection is looking for all workorders at a particular status such as 'WORKDONE.' My current suppression in details is merely a way to hide those workorders that are parents, since they are shown in each group as WO_PARENT.WONUM. Records in details are displayed as WORKORDER.WONUM. The way I am suppressing parent workorders in details is with a formula that looks at workorders with the checkflag "{WORKORDER.HASCHILDREN} = Y". This works only if each parent has a child that is within my record selection query of STATUS= 'Workdone.' So, basically, if the report doesn't query a child to a parent, the parent will not be grouped. All I need to do is suppress a workorder number in details if it exists as a group name. So I need to compare WORKORDER.WONUM to PARENT_WO.WONUM, and eliminate WORKORDER.WONUM if there are duplicated.
 
why don't you just put this in your record select...if you are suppressing those records anyway

{WORKORDER.HASCHILDREN} = "Y"



Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top