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

Filtering out group results by a criteria 1

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
hi,
I have a group by project code
within that group are all projects that are related to that project code.

example:

ProjectD
ProjectD hours budget
ProjectJ hours budget
ProjectW hours budget
ProjectS hours budget

due to the nature of the data, Project D comes out in the results.
This isn't a problem though, but what I have to do is return only certain projects based on the group project code.

in the above example, with ProjectD, i only want to show ProjectD and ProjectJ in the group
Likewuse if the group header is ProjectS
I only want to show ProjectS and ProjectW in the group details.

this is the only criteria and will not change..

so, If groupheader ends in 'D' then show only projects ending in D and J
If groupheader ends in 'S' then show only projects ending in 'S' or 'W'

how would I go about doing this?
its been a while since I used Crystal, so I have forgotten a lot of what I learned...

thanks in advance,
Matt



 
Use the section expert (format->section)->details->suppress->x+2 and enter:

(
{table.projcode} = "ProjectD" and
not({table_det.projcode} in ["ProjectD","ProjectJ"])
) or
(
{table.projcode} = "ProjectS" and
not({table_det.projcode} in ["ProjectS","ProjectW"])
)

This assumes that you are getting the detail project codes from a different table. If you have a reason to use only the last character in the project code, then substitute

right(trim({table_det.projcode}),1)

...for {table_det.projectcode} in the above formula. Do a similar substitution for the group field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top