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

to subreport or not to subreport

Status
Not open for further replies.

crystalfun

Programmer
Feb 8, 2001
39
US
I have a report which lists sick days on an employee basis. This report will be sent to employees so we have each sick day listed on one line with an explanation.

If one special reason is present in any of the employee's details I want a common explanation to print below.

A simple If Then formula doesn't seem to work properly.

First question: How can I do this? I tried a subreport and processor maxed out.

Second ?: Is a subreport the best way to do it.
 
I would use a conditional formula and a total:

First the formula called {@target}:

If {code} = Your target value
then 1
else 0


Now a second formula that says:

If Sum({@target}) > 0
then "Explanation"
else ""


If you have multiple employee groups the second formula would be:


If Sum({@target},{EmployeeID}) > 0
then "Explanation"
else "" Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Was able to get this to work when printing on an individual basis but when I run it with more than one person the comment will print on everyone's sheet even if they do not meet the criteria.

Any suggestions?
 
Group on employee and use the second formula.
This is based on the subtotal rather than the grand total Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top