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
Calculated Columns Crystal Conversion assistance
Calculated Columns Crystal Conversion assistance
Hello,
Please use following expression:
Thank you.
Please use following expression:
Code: Select all
(TaxInclusive == 1 ?
(command.PND_BARCODE.Trim() == "NOTE:" || command.PND_BARCODE.Trim() == "*SECTION/*" || command.PND_BARCODE.Trim() == "SUBTOTAL" ? 0 :
(command.PND_SPEC.Trim() == "Y" ? Command.PND_RPRICE : ((Command.PND_RPRICE - ((Command.PND_RPRICE / 100) * Command.PND_DISC)) * Command.PND_QUANTITY))) :
(command.PND_BARCODE.Trim() == "NOTE:" || command.PND_BARCODE.Trim() == "*SECTION/*" || command.PND_BARCODE.Trim() == "SUBTOTAL" ? 0 :
(command.PND_SPEC.Trim() == "Y" ? Command.PND_PRICE : ((Command.PND_PRICE - ((Command.PND_PRICE / 100) * Command.PND_DISC)) * Command.PND_QUANTITY))))
Calculated Columns Crystal Conversion assistance
Fantastic
I was almost there, but this has cleared things up.
THANKS
I was almost there, but this has cleared things up.
THANKS
Calculated Columns Crystal Conversion assistance
Hello,
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.