Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

background formatting in crystal reports

I have a Crystal Report in Vs 2010. I'm Trying to format the background of a Column, Based on data values. Using this code only the first condition Works because I tried to switch the if conditions and again only the first condition works.

IF {TBM_Report_qry.DiF}<={TBM_Report_qry.tbm} then RGB(234,234,234)
else
(
  IF {TBM_Report_qry.inproduction_DiF}<={TBM_Report_qry.Reqired}
  then RGB(234,234,234)
  else
  (
  IF {TBM_Report_qry.DiF_Close}<={TBM_Report_qry.clse_Diff}
  then RGB(234,234,234)
  )
)

replied

I have it Solved

I just needed to check for null Values!

Here is the working Formula.

IF Not ISNULL({TBM_Report_qry.DiF}) AND {TBM_Report_qry.DiF}<={TBM_Report_qry.tbm} then RGB(234,234,234) // uses required date

else

IF Not ISNULL({TBM_Report_qry.inproduction_DiF})AND{TBM_Report_qry.inproduction_DiF}<={TBM_Report_qry.Reqired} then RGB(234,234,234) //uses tentative date

else

IF  Not ISNULL({TBM_Report_qry.DiF_Close})AND {TBM_Report_qry.DiF_Close}<={TBM_Report_qry.clse_Diff} then RGB(234,234,234) // uses closing date

else   crNoColor

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question