<div>I am currently writing a crystal report but have hit a bit of a brick wall and I'm hoping someone will be able to help me.</div> <div> </div> <div>In brief what I am trying to do is:</div> <div> </div> <div>The table I am looking at is for Estimates we
create and for 1 estimate it can have upto 5 components</div> <div> </div> <div>EG: Est 1 - Comp 1, Comp 2, Comp 3, Comp 4 and Comp 5</div> <div> </div> <div>What I want to see is the first available Component per estimate. Unfortunately it is not as simple
are as {Comp}= "Comp 1" because our estimators are able to delete "Comp 1", making "Comp 2" the first component.</div> <div> </div> <div>What I need is something along the lines of:</div> <div> </div> <div>If Comp 1 is the first compent hide the rest else</div>
<div>if Comp 2 is the first compent hide the rest</div> <div> </div> <div>Have tried:</div> <div> </div> <div>if {Comp}="Comp 1" then {Comp}="Comp 1" else</div> <div>if {Comp}="Comp 2" then {Comp}="Comp 2" else</div> <div>...</div> <div> </div> <div>Any help
you can give would be much appreciated.</div> <div> </div> <div>Thank you </div>
<div> The solution lay in the "Suppression" function in "Section Expert" not the "Select Expert".</div> <div> </div> <div>I assigned a Value to each Comp possibility</div> <div>IE: Comp1 = 1 , Comp2 = 2 etc.</div> <div> </div> <div>Did a summary by esimate
to show the Minimum Value so if Comp1 wasn't there the min value would be 2 and so on.</div> <div> </div> <div>Then in Section Expert / Detail / Suppress I put in the formula:</div> <div> </div> <div>if
{@comp}=Minimum ({@comp},
{Estimate-ID}) then false else true</div> <div> </div> <div>This supressed all the higher values and left me with the first component for each estimate.</div>
None
0 Points
2 Posts
IF Expression In Select Expert
May 30, 2012 05:31 AM|pcr1984|LINK
Hi All,
<div>I am currently writing a crystal report but have hit a bit of a brick wall and I'm hoping someone will be able to help me.</div> <div> </div> <div>In brief what I am trying to do is:</div> <div> </div> <div>The table I am looking at is for Estimates we create and for 1 estimate it can have upto 5 components</div> <div> </div> <div>EG: Est 1 - Comp 1, Comp 2, Comp 3, Comp 4 and Comp 5</div> <div> </div> <div>What I want to see is the first available Component per estimate. Unfortunately it is not as simple are as {Comp}= "Comp 1" because our estimators are able to delete "Comp 1", making "Comp 2" the first component.</div> <div> </div> <div>What I need is something along the lines of:</div> <div> </div> <div>If Comp 1 is the first compent hide the rest else</div> <div>if Comp 2 is the first compent hide the rest</div> <div> </div> <div>Have tried:</div> <div> </div> <div>if {Comp}="Comp 1" then {Comp}="Comp 1" else</div> <div>if {Comp}="Comp 2" then {Comp}="Comp 2" else</div> <div>...</div> <div> </div> <div>Any help you can give would be much appreciated.</div> <div> </div> <div>Thank youNone
0 Points
2 Posts
Re: IF Expression In Select Expert
May 30, 2012 06:19 AM|pcr1984|LINK
I have worked it out now.
<div> The solution lay in the "Suppression" function in "Section Expert" not the "Select Expert".</div> <div> </div> <div>I assigned a Value to each Comp possibility</div> <div>IE: Comp1 = 1 , Comp2 = 2 etc.</div> <div> </div> <div>Did a summary by esimate to show the Minimum Value so if Comp1 wasn't there the min value would be 2 and so on.</div> <div> </div> <div>Then in Section Expert / Detail / Suppress I put in the formula:</div> <div> </div> <div>if {@comp}=Minimum ({@comp}, {Estimate-ID}) then false else true</div> <div> </div> <div>This supressed all the higher values and left me with the first component for each estimate.</div>