Crystal Report If else on formula

Sandeep Kumar

I got an error for following formula on crystal reports.error is The remaining text does not appear to be part of the formula

Numbervar t:=0;
IF({GLTRANDE.GLTYPE} =1 OR {GLTRANDE.GLTYPE} =5 )Then
WhilePrintingRecords;
t:=tonumber({GLTRAN.CRDIFF})-tonumber({GLTRAN.DRDIFF})
//ELSE IF({GLTRANDE.GLTYPE}="2" OR {GLTRANDE.GLTYPE}="3" OR {GLTRANDE.GLTYPE}="4" )Then
else
WhilePrintingRecords;
t:=tonumber({GLTRAN.DRDIFF})-tonumber({GLTRAN.CRDIFF})

please give a advice for rectify this issue

Hexxx

Try making use of paranthesis and also add semicolon to the last statements of if and else

Numbervar t:=0;
IF({GLTRANDE.GLTYPE} =1 OR {GLTRANDE.GLTYPE} =5 )Then
(
WhilePrintingRecords;
t:=tonumber({GLTRAN.CRDIFF})-tonumber({GLTRAN.DRDIFF});
)
else
(
WhilePrintingRecords;
t:=tonumber({GLTRAN.DRDIFF})-tonumber({GLTRAN.CRDIFF});
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Crystal Report Formula

From Dev

Crystal Report formula to reset a count?

From Dev

Crystal formula conversion in SSRS report

From Dev

Formula workshop - formula editor in crystal report

From Dev

How to add formula on Crystal report fields

From Dev

Crystal Report Error in Formula Record selection?

From Dev

How to Format formula Field result in a Crystal Report?

From Dev

Pasing paramter values from a formula in Crystal Report

From Dev

Crystal Report Error in formula This field name is not known

From Dev

Getting Max and Min Values in Crystal Report Formula

From Dev

Use like operator in Crystal Report record selection formula

From Dev

Crystal Report Record Selection Formula to Eliminate Duplicate Rows

From Dev

Crystal Report: hide some objects with Format Object - Suppress Formula

From Dev

Is it possible to preserve the default formula fields values in a crystal report?

From Dev

crystal report formula get sum depend on payment mood

From Dev

How to show tax price using crystal report based on formula?

From Dev

How to get the Previous formula field value in Crystal Report?

From Dev

How to do conditional sum in formula fields on crystal report?

From Dev

crystal report - if else statement when array is declared: string length error

From Dev

Crystal Report's 3 Way Formula is not working with a Two-Page Report

From Dev

Yearly Report in Crystal Report

From Dev

Yearly Report in Crystal Report

From Dev

How to sum the running total field value and formula field value in crystal report?

From Dev

Crystal report formula for adding/subtracting value from one field to another field

From Dev

need to sum only specific sub-groups in Crystal report. sub group formula

From Dev

How to pass formula field value in Crystal Report to my Form in C#?

From Dev

Crystal Report : Nothing appears in crystal report

From Dev

Display a field if it's different than 0, else don't display it - in a Crystal Reports formula

From Dev

Crystal Reports Formula Logic

Related Related

  1. 1

    Crystal Report Formula

  2. 2

    Crystal Report formula to reset a count?

  3. 3

    Crystal formula conversion in SSRS report

  4. 4

    Formula workshop - formula editor in crystal report

  5. 5

    How to add formula on Crystal report fields

  6. 6

    Crystal Report Error in Formula Record selection?

  7. 7

    How to Format formula Field result in a Crystal Report?

  8. 8

    Pasing paramter values from a formula in Crystal Report

  9. 9

    Crystal Report Error in formula This field name is not known

  10. 10

    Getting Max and Min Values in Crystal Report Formula

  11. 11

    Use like operator in Crystal Report record selection formula

  12. 12

    Crystal Report Record Selection Formula to Eliminate Duplicate Rows

  13. 13

    Crystal Report: hide some objects with Format Object - Suppress Formula

  14. 14

    Is it possible to preserve the default formula fields values in a crystal report?

  15. 15

    crystal report formula get sum depend on payment mood

  16. 16

    How to show tax price using crystal report based on formula?

  17. 17

    How to get the Previous formula field value in Crystal Report?

  18. 18

    How to do conditional sum in formula fields on crystal report?

  19. 19

    crystal report - if else statement when array is declared: string length error

  20. 20

    Crystal Report's 3 Way Formula is not working with a Two-Page Report

  21. 21

    Yearly Report in Crystal Report

  22. 22

    Yearly Report in Crystal Report

  23. 23

    How to sum the running total field value and formula field value in crystal report?

  24. 24

    Crystal report formula for adding/subtracting value from one field to another field

  25. 25

    need to sum only specific sub-groups in Crystal report. sub group formula

  26. 26

    How to pass formula field value in Crystal Report to my Form in C#?

  27. 27

    Crystal Report : Nothing appears in crystal report

  28. 28

    Display a field if it's different than 0, else don't display it - in a Crystal Reports formula

  29. 29

    Crystal Reports Formula Logic

HotTag

Archive