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 subreport and conditional formatting.

Status
Not open for further replies.

lilal111

Technical User
Sep 16, 2008
18
CA
i am trying to compare two values in a report. One is a summary of hours called assigned hours and the other is actual hours. The actual hours is a subreport that is linked to the project and client. These are both placed in the details section of the report. What I am trying to accomplish is turn the line yellow if the actual hours are greater than the assigned.


project client name assigned hours actual hours

3648 xxxxxxxxxxx 0.0 45.5

thanks.


 
Insert another detail section. Place the subreport in detail_a and in the sub create a formula and place it in the sub footer:

whileprintingrecords;
shared numbervar hrs := <youractualhoursformula>;

In the main report, go into the section expert->detail_b->color tab->background->x+2 and enter:

whileprintingrecords;
shared numbervar hrs;
if hrs > sum({table.assignedhrs},{table.project}) then
cryellow els
crnocolor

You can format detail_a "to underlay to underlay following sections" to maintain the desired alignment.

-LB
 
Thank you very much Ibas !!!!
it worked really well!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top