I want to convert this Crystal formula into SSRS Expression:
Formula:
numberVar iDay := ToNumber(Right(Cstr({@PrntStartDate}), 2)) + 9;
select iDay
case 1 : {wk_TORIO0430_b.AcquisitionAmnt1}
case 2 : {wk_TORIO0430_b.AcquisitionAmnt2}
case 3 : {wk_TORIO0430_b.AcquisitionAmnt3}
case 4 : {wk_TORIO0430_b.AcquisitionAmnt4}
case 5 : {wk_TORIO0430_b.AcquisitionAmnt5}
How can I write this in SSRS Expression?
Not exactly sure what the first line of this is doing as I don't use Crystal Reports myself, but at Nick said in the comments, the
select case
can be rewritten using aswitch
statement. A possible solution to fix the first line would be to add a similar statement to a calculated field and using that field in the switch. You'll have to figure out the logic being used for thenumberVar iDay
line so you can put it in as it should be.