Calculated Columns Crystal Conversion assistance
Posted: Tue Sep 29, 2009 7:15 am
I am new to Stimulsoft reports & just geting my head around the syntax.
I am attempting to convert some of our Crystal Reports into your format but by re-creating from scratch (best way to learn I guess)
I am having a problem converting some of our logic in the formula fields in Crystal into Stimulsoft Calculated Columns.
I know that Crystals VB is a little different & have also tried re-writing with c#, however my skills are very limited with c# and I am quickly trying to learn it.
Could somebody help me convert the following crystal code into C sharp that will work in Stimulsoft please?
I have figured out the basics but the more complex if elseif else statements are just beyong me still.
This will help me a great deal to understand a more complex expressions!
if {?Tax Inclusive} = 1 then
if trim({Command.PND_BARCODE}) = 'NOTE:' OR trim({Command.PND_BARCODE}) = '*SECTION/*' OR TRIM ({Command.PND_BARCODE}) = 'SUBTOTAL' then 0
else if trim({Command.PND_SPEC}) = 'Y' then {Command.PND_RPRICE}
else (({Command.PND_RPRICE} - (({Command.PND_RPRICE} / 100) * {Command.PND_DISC})) * {Command.PND_QUANTITY})
else
if trim({Command.PND_BARCODE}) = 'NOTE:' OR trim({Command.PND_BARCODE}) = '*SECTION/*' OR TRIM ({Command.PND_BARCODE}) = 'SUBTOTAL' then 0
else if trim({Command.PND_SPEC}) = 'Y' then {Command.PND_PRICE}
else (({Command.PND_PRICE} - (({Command.PND_PRICE} / 100) * {Command.PND_DISC})) * {Command.PND_QUANTITY})
I have a simple if then else command working OK ((command.PND_BARCODE.Trim() == "*SECTION/*" ? command.PND_DESCRIPTION : command.ITE_LONGDESC)) but struggling with above.
Many thanks in advance
I am attempting to convert some of our Crystal Reports into your format but by re-creating from scratch (best way to learn I guess)
I am having a problem converting some of our logic in the formula fields in Crystal into Stimulsoft Calculated Columns.
I know that Crystals VB is a little different & have also tried re-writing with c#, however my skills are very limited with c# and I am quickly trying to learn it.
Could somebody help me convert the following crystal code into C sharp that will work in Stimulsoft please?
I have figured out the basics but the more complex if elseif else statements are just beyong me still.
This will help me a great deal to understand a more complex expressions!
if {?Tax Inclusive} = 1 then
if trim({Command.PND_BARCODE}) = 'NOTE:' OR trim({Command.PND_BARCODE}) = '*SECTION/*' OR TRIM ({Command.PND_BARCODE}) = 'SUBTOTAL' then 0
else if trim({Command.PND_SPEC}) = 'Y' then {Command.PND_RPRICE}
else (({Command.PND_RPRICE} - (({Command.PND_RPRICE} / 100) * {Command.PND_DISC})) * {Command.PND_QUANTITY})
else
if trim({Command.PND_BARCODE}) = 'NOTE:' OR trim({Command.PND_BARCODE}) = '*SECTION/*' OR TRIM ({Command.PND_BARCODE}) = 'SUBTOTAL' then 0
else if trim({Command.PND_SPEC}) = 'Y' then {Command.PND_PRICE}
else (({Command.PND_PRICE} - (({Command.PND_PRICE} / 100) * {Command.PND_DISC})) * {Command.PND_QUANTITY})
I have a simple if then else command working OK ((command.PND_BARCODE.Trim() == "*SECTION/*" ? command.PND_DESCRIPTION : command.ITE_LONGDESC)) but struggling with above.
Many thanks in advance