on 01-14-2015 1:53 AM
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)
)
)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Try:
If ( {TBM_Report_qry.DiF}<={TBM_Report_qry.tbm} OR {TBM_Report_qry.inproduction_DiF} <={TBM_Report_qry.Reqired} OR {TBM_Report_qry.DiF_Close} <= {TBM_Report_qry.clse_Diff})
then RGB(234,234,234)
else crNoColor
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Abhilash Kumar For your reply.
But it still doesn't work the second and third condition don't get formatted.
I tried switching the second condition with the first one all the formatting that ocured with {TBM_Report_qry.DiF}<={TBM_Report_qry.tbm} no longer were formatted and the {TBM_Report_qry.inproduction_DiF} <={TBM_Report_qry.Reqired} which were not formatted now they are.
All this with out modifying the data.
Thanks in advance.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.