Welcome, Guest
Username: Password: Remember me
Components and Libraries for Reports Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

VisibleExpression on FPReport 4 years 8 months ago #13513

  • Max
  • Max's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
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.

VisibleExpression on FPReport 4 years 8 months ago #13514

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
A source sample ?
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

VisibleExpression on FPReport 4 years 8 months ago #13515

  • Max
  • Max's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
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')

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

VisibleExpression on FPReport 4 years 8 months ago #13516

  • Max
  • Max's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
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.

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

Last edit: by Max. Reason: Wrong example

VisibleExpression on FPReport 4 years 8 months ago #13517

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Thanks Sir
PilotLogic Architect and Core Programmer

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

  • Page:
  • 1