Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   fast report if else (https://www.delphipraxis.net/179159-fast-report-if-else.html)

question 17. Feb 2014 20:02

fast report if else
 
Hi,
I am using fast report with delphi to create the report, i have a variable in fast report, [frxDBDataset1."lief"] and i would like to use an if else statement for example:
if [frxDBDataset1."lief"]>2 then [frxDBDataset1."lief"]=0
i was trying but not getting appropriate syntax for if else in fast report, can anybody help me please

ibp 18. Feb 2014 07:17

AW: fast report if else
 
Hi, try that..
Code:
[IIF(<frxDBDataset1."lief">>2,0,<frxDBDataset1."lief">)]

Buddelfish 18. Feb 2014 07:25

AW: fast report if else
 
I don't think that you can modify the contents of a data field. That's not what FastReport is made for.

IBP's approach is what you need in this case.

The more general approach is to copy fields you wish to modify to a local/global variable. You can access that variable from within the report designer (afaik) as well as set it from within the script code and delphi code.


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz