PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Expand]Guide for PANTHEON
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Collapse]User Manuals for PANTHEON
  [Expand]User Manual for PANTHEON
  [Expand]User Manual for PANTHEON Retail
  [Expand]User manual for PANTHEON Vet
  [Expand]User Manual for PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Guides for PANTHEON Web
  [Expand]Guide for PANTHEON Web Light
  [Expand]Guide for PANTHEON Web Terminal
  [Expand]Guide for PANTHEON Web Legal
  [Expand]Old products Archive
 [Collapse]User Manuals for PANTHEON Web
  [Expand]Getting started PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
  [Expand]User Manual for PANTHEON Web Terminal
  [Expand]User Manual for PANTHEON Web Legal
  [Expand]Old products Archive
[Collapse]PANTHEON Granules
 [Collapse]Guides for PANTHEON Granules
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]Dashboard Granule
  [Expand]B2B Orders Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
 [Collapse]User Manuals for PANTHEON Granules
  [Expand]Getting started
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]B2B Orders Granule
  [Expand]Dashboard Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
  [Expand]Archive
[Expand]User Site

Load Time: 1234.3868 ms
"
  6613 | 1 | |
Label


Function IIF


Function IIF is similar to the conditional statement if - then – else.

Header

function IIF(Expr: Boolean; TrueValue, FalseValue: Variant): Variant;


Function GetFormValue

The GetFormValue function returns the value in the object in the program window. Its argument is the name of the object in the window along with the name of the window. If an object does not exist or a form is not created, the function returns an empty string.


Header

function GetFormValue(FormComponentName: String): Variant;

 

 

An example of using the IIF function


The next example of using the IIF function is on the 22G report, which can be found in the program in the Goods | VAT menu only for Croatian legislation. The term first displays the name of the subject. If a VAT number is also entered, it will also print it in the new line. For the transition to the new line, the character sequence LF (No. 13) and CR (No. 10) was used.

[IIF(<qReportIzpis."acCode"> = '', <qReportIzpis."acSubject">,
<qReportIzpis."acSubject"> + Chr(13) + Chr(10)+ <qReportIzpis."acCode">)] 


If nesting the IIF function, it quickly becomes opaque (non-transparent), so it's better to replace it with the if statement in the code. A code equivalent to the above expression is

procedure Memo19OnBeforePrint(Sender: TfrxComponent);
begin
if (<qReportIzpis."acCode"> = '' then
  Memo19.Text := <qReportIzpis."acSubject">
else
  Memo4.Text := <qReportIzpis."acSubject"> + Chr(13) + Chr(10)+ <qReportIzpis."acCode">;
end;

  

     


Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!