I have a subreport, and in the Group Footer, I have string, that I am trying to change the background color using the following code.
If WorkID IS equal to the Technical.workId or the Development.WorkId, then the color code works, but the other items are solid black.
If If WorkID IS NOT equal to or null to the Technical.workId or the Development.WorkId, the my report is blank.
if
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}<>{Technical.workId}
and {Work.WorkID}<>{Development.WorkId} Then crNoColor
else if
(
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Development.WorkId}
and {Development.PlanName}={Project.ProjectName}
and {Development.devStatus} = "R" )
then crRed
else if (
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Development.WorkId}
and {Development.PlanName}={Project.ProjectName}
and {Development.devStatus} = "A" )
then crYellow
else开发者_如何学C if (
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Tech.workId}
and ({Resource.Team Name}like "Tech*")
and {Technical.TechStatus} = "R" )
then crRed
else if (
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Tech.workId}
and ({Resource.Team Name}like "Tech*")
and {Technical.TechStatus} = "A" )
then crYellow
else if (
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Tech.workId}
and ({Resource.Team Name}like "QA*")
and {Technical.TechStatus} = "R" )
then crRed
else if (
{?Pm-DB.ID}={Work.Num}
and {Work.WorkID}={Tech.workId}
and ({Resource.Team Name}like "QA*")
and {Technical.TechStatus} = "A" )
then crYellow
You have to explicitly check for null using isnull
otherwise the formula gives up.
I think you need an else part of your statement to able to work that, if you dont want to color the blank record.. just include crNone or crWhite on your else statement
Hope this helps,
Joven
精彩评论