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!

problem with record selection - bringing in all instead of unique

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
hi there. I have a main report linked to a subreport based on a client id. In my subreport I want to see all income pay codes equal to 1 and all income benefit codes equal to 2 where the subbenefit codes are equal to A, B, C, D, G, I, J and M.

so I have my record selection as
(income code type = 1) or (income code type = 2 and income code in "A", "B", "C", "D", "G", "I", "J", "M")

within that subreport I have a grouping on incode codes

I seem to be pulling in records in that subreport for all in the company, not just specific to that employee id. Please help me - I am sick about it now!!! Much appreciated.
 
In Crystal 8.5, when you make a link to a subreport, it normally puts a selection statement in the record selection for the subreport. Presumably it did that for employee id, but you then removed it and replaced it with the other selection criteria you mentioned. You need to put it back within the subreport.

It might also be a good idea to put the whole income code type = 2 etc. in a formula field that could be 'true' or 'false'

Madawc Williams
East Anglia, Great Britain
 
I'm guessing you have a group on clientID in the main report. I would group on clientID in the subreport also, making it the outer group. You already have a link on clientID between main and sub, so then you would place the subreport in the group header or footer for the clientID group in the main report. This way the subreport should display just the results per client.

Not sure that was what you meant, but just in case...

-LB
 
(income code type = 1) or (income code type = 2 and income code in [ "A", "B", "C", "D", "G", "I", "J", "M"] )

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top