Forum
× Components and Libraries for Reports Development, discussions, problems and suggestions

Question VisibleExpression on FPReport

  • Max
  • Max's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 4 days ago #13513 by Max
VisibleExpression on FPReport was created by Max
Hi,

I try to put VisibleExpression on a control in the data band, but I can't refer to the value of the field.
For example, if I type: 'A' = 'B' the expression works, but if I insert in the VisibleExpression the condition: [fieldname] = 'B' does not work. I get an error from EExprScanner which says: unknown character at pos 1: '['.
Can anyone tell me why?

(code typhon 6.8 with fpc 3.31 on windows 10)

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 month 4 days ago - 1 month 4 days ago #13514 by Sternas Stefanos
Replied by Sternas Stefanos on topic VisibleExpression on FPReport
A source sample ?

PilotLogic Architect and Core Programmer
Last edit: 1 month 4 days ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

  • Max
  • Max's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 4 days ago #13515 by Max
Replied by Max on topic VisibleExpression on FPReport
Hi,

I have uploaded an example with the described case. I would like to be able to display / hide an image
based on the field retrieved (in this case 'Y' or 'N')
Attachments:

Please Log in or Create an account to join the conversation.

  • Max
  • Max's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 4 days ago - 1 month 4 days ago #13516 by Max
Replied by Max on topic VisibleExpression on FPReport
Hi,

I solved the problem!
In the VisibleExpr condition of the image control, instead of:

[APPROVED] = 'Y';

I put:

IF (APPROVED = 'Y', TRUE, FALSE)

and the report is created correctly.
Last edit: 1 month 4 days ago by Max. Reason: Wrong example

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 month 4 days ago #13517 by Sternas Stefanos
Replied by Sternas Stefanos on topic VisibleExpression on FPReport
Thanks Sir

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.