PANTHEON™ Help

 Toc
 Početna stranica - PANTHEON uputstva
[Collapse]PANTHEON
 [Collapse]PANTHEON priručnici
  [Expand]Vodič po Datalab PANTHEON FarmAccounting
  [Expand]Vodič po PANTHEON Retail
  [Expand]Vodič po DataLab PANTHEON™
  [Expand]Vodič po PANTHEON VET
 [Collapse]PANTHEON korisnički priručnici
  [Expand]Korisnički priručnik za DataLab PANTHEON
  [Expand]Korisnički priručnik za PANTHEON Vet
  [Expand]Korisnički priručnik za PANTHEON Maloprodaju
  [Expand]Korisnički priručnik za PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Vodiči po PANTHEON Web
  [Expand]Vodič za PANTHEON Web Terminal
  [Expand]Vodič po PANTHEON Web Light
  [Expand]Vodič za PANTHEON Web Legal
  [Expand]Arhiva starih proizvoda
 [Collapse]Korisnički priručniki za PANTHEON Web
  [Expand]Kako započeti s programom PANTHEON Web
  [Expand]Korisnički priručnik za PANTHEON Web Light
   Korisnički priručnik za PANTHEON Web Terminal
  [Expand]Korisnički priručnik za PANTHEON Web Legal
  [Expand]Arhiva starih proizvoda
[Collapse]PANTHEON Granule
 [Collapse]Vodič za PANTHEON Granule
  [Expand]Granula Kadrovi
  [Expand]Granula Putni nalozi
  [Expand]Granula Dokumenti i zadaci
  [Expand]Granula Nadzorna ploča
  [Expand]Granula B2B naručivanje
  [Expand]Granula Servis na terenu
  [Expand]Inventar Fiksne Imovine Granula
  [Expand]Granula Inventura skladišta
 [Collapse]Korisnički priručnik za PANTHEON Granule
   Početak
   Primjer korištenja PANTHEON Granula u fiktivnom preduzeću
  [Expand]PANTHEON Granule i aktivacija
  [Expand]Granula Kadrovi
  [Expand]Granula Putni nalozi
  [Expand]Granula Dokumenti i zadaci
  [Expand]Granula B2B Naručivanje
  [Expand]Granula Nadzorna ploča
  [Expand]Granula Servis na terenu
   PANTHEON Granule - česta pitanja i odgovori
  [Expand]Inventar Fiksne Imovine Granula
  [Expand]Inventar u skladištu granula
  [Expand]Arhiva
[Collapse]Korisničke stranice
  Test 2
  Test 3
  Test 5
  TEST_Kreiranje noveg zaposlenika 1000003067
  TEST_Kreiranje noveg zaposlenika 1000003067-MK
  TEST3_Kreiranje novog dokumenta 1000003410-SL
  TEST2_Uređivanje kontaktnih podataka 1000003415-SL
  Test
 [Collapse]Test za CG
   Test podređeni 1
  TEST_Kreiranje noveg zaposlenika 1000003067-BA
  TEST_Kreiranje novog zaposlenika 1000003067-SR
  TEST_Kreiranje noveg zaposlenika 1000003067_EU_ORIG
 [Collapse]Pantheon hosting
  [Expand]Hosting robot
  [Expand]DEMO hosting
  Porez ( cookies )
 [Collapse]Prijava na korisničke stranice
   Registracija za Pantheon korisnike
   Glavna stranica
   Prva posjeta korisničkom sajtu
  Novosti
  Uvod u Wiki
  Upute za stranicu izbornika
 [Collapse]Potpora
  [Expand]Tehnička podrška
   Podrška na daljinu za Host korisnike
  [Expand]Daljinska podrška
  Kako upotrebljavam i dopunjujem wiki ?
 [Collapse]Pomoć
   Pantheon Hosting
   Uporedba verzija pantheona
  [Expand]Dokumentacija
   Vsa navodila
   Video uputstva
   Video novosti
   Pitaj druge korisnike
   Postanite PANTHEON svetovalec
   Sve vijesti
   Svi događaji
   Pregled opomb i planova
   Plan
 [Collapse]Informacije
   Obavijesti
  [Expand]Nastavitev deviznih tečajev
 [Collapse]Moji podaci
   Ugovor o osvježavanju
   Podaci o kompaniji
  [Expand]Pooblaščene osobe
   Dovoljenja
   Lični podaci
   Kontaktni podatci
   Osveževalna pogodba
 [Collapse]Forum
   Spremljanje foruma
 [Collapse]Video
   Instruktivni videozapisi
   Video Ažuriranja
  Portal za razvijače
  Tržnica
 [Collapse]Wiki uputstva
  [Expand]Uvod u wiki
  [Expand]Pretraga po Wikiju
  [Expand]Uređenje Wiki-a
   Pripenjanje dokumentov

Load Time: 374,9954 ms
"
  6613 | 1 | |
Label


In this topic we will look at some examples of using GetFormValue function.

Getting Value of Object from PANTHEON Window

 

In the first example we will write down the expression that returns the warehouse on the invoices issued that is in the program menu 'Goods | Invoices Issued Report | Invoices Issued/Profit Margin Report'. The name of the window is 'PrometObracunIzdRac', the name of check box in which we select the warehouse is 'fWarehouse'.

[GetFormValue('PrometObracunIzdRac.fWarehouse')]


Getting Value from Window with Document

 

Names of some document windows are composed of a base and a suffix representing the type of document. If we want to print the referent on the issue, we write down the term
[GetFormValue('PrometIzdDob3000.fReferentZap')]
It will returns value only in the case of document type 3000. In order to return value for all document types, we have to rewrite this code to

[GetFormValue('PrometIzdDob'+<tbLookPoslDog."acDocType">+'.fReferentZap')]

Where dataset "tbLookPoslDog" is not available, we can get the name of the window from the document number. On sale orders report we write:


[IIF(Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+4,1) ='-',
GetFormValue('Naroc'+Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+1,3)+'0.fReferentZap'),
GetFormValue('Naroc'+Copy(<qReportIzpisD."acKeyView">,Pos('-',
<qReportIzpisD."acKeyView">)+1,4)+'.fReferentZap'))]

 

Example with Date

The GetFormValue function returns the date in the yyyy/mm/dd format, but usually in Slovenia want date in the dd.mm.yyyy or d.m.yyyy format.

The best example is when there are no data that you need in the dataset, there are notifications of outstanding commitments that are in the program in the 'Financials | Reports | Outstanding items'.

The following expression returns the date of the state in the yyyy/mm/dd format:

[GetFormValue('GLOutstandingItems.edtDate')]

The term also has a disadvantage that if the date is not entered, it returns "1900/01/01" (what is not possible in this case).
We must check whether the date is entered before printing with the IIF function:

[IIF(GetFormValue('GLOutstandingItems.edtDate')= '1900/01/01','',
GetFormValue(''GLOutstandingItems.edtDate'))]


If we want to print the date in the format dd.mm.yyyy, we need to change the order of the numbers on the report:

[IIF(GetFormValue('GLOutstandingItems.edtDate') ='1900/01/01','',
Copy(GetFormValue('
GLOutstandingItems.edtDate'),9,2)+'.'+
Copy(GetFormValue('
GLOutstandingItems.edtDate'),6,2)+'.'+
Copy(GetFormValue('
GLOutstandingItems.edtDate'),1,4))]

The date in the d.m.yyyy format is obtained by turning the day of the month and month into a number and then back to text:

[IIF(GetFormValue('GLOutstandingItems.edtDate') ='1900/01/01','',
IntToStr(StrToInt(Copy(GetFormValue('
GLOutstandingItems.edtDate'),9,2)))
+'.'+IntToStr(StrToInt(Copy(GetFormValue('
GLOutstandingItems.edtDate'),6,2)))
+'.'+Copy(GetFormValue('
GLOutstandingItems.edtDate'),1,4))] 

 

Example with non-text Object


The GetFormValue function can also be used for objects that do not represent a text. In this case, the most important feature of this facility is returned. Returned value is usually not suitable for direct printing, but we can use it on the report itself. For example, text is displayed in the window at this value.

As an example, we look  a radio button group called 'grpGroupBy' on account card report for example '32D- Account Card' that is in the program menu  'Financials | Reports | Account Card'. The name of the window is 'GLAccountCard'. For this object type function returns the 'ItemIndex' property that determines which button is selected. In our example, this property determines how data is to be aggregated and the bands on the report are hidden. The value returned by the function is written to the 'nGroupBy' variable and then, depending on its value, we hide the bands on the report, In the "SubjektFooterOnBeforePrint" procedure.


  var nGroupBy: Integer;
  ...
  procedure SubjektFooterOnBeforePrint(Sender: TfrxComponent);
  begin
    if nGroupBy <= 1 then
      SubjektFooter.Visible := False;
  end;
  ...
  nGroupBy := GetFormValue('GLAccountCard.grpGroupBy');

  

     


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