Recent

Author Topic: Script on report  (Read 4025 times)

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
Script on report
« on: October 15, 2017, 03:45:58 am »
Hello i have a report i put script to check it hide or show value all look is working but not working in all as you can see at the image column type change I to O the column must show the value but previus column must hide the value but is show it my script is this.
Code: Pascal  [Select][+][-]
  1. If SQLQKarPart.type ='O' then
  2. TEXT:=str(SQLQKarPart.Quantity )
  3.                                  ^^^
  4. ELSE
  5.  
  6.  TEXT:= '0';
  7.  
an the scriprt for  type = I
Code: Pascal  [Select][+][-]
  1. If SQLQKarPart.type ='I'  then
  2.    TEXT:= str(SQLQKarPart.Quantity)
  3.                                  ^^^
  4. ELSE
  5.   TEXT :='0';
  6.  

GAN

  • Sr. Member
  • ****
  • Posts: 370
Re: Script on report
« Reply #1 on: October 15, 2017, 06:18:12 am »
Hi, try this way:

Code: Pascal  [Select][+][-]
  1. If ( ( [SQLQKarPart."type" ='O'] ) or ( [SQLQKarPart."type" ='I'] ) )
  2.   then
  3.     TEXT:=[SQLQKarPart."Quantity"]
  4.   else
  5.     TEXT:='0';
  6.  
Lazarus 2.0.8 FPC 3.0.4 Linux Mint Mate 19.3
Zeos 7̶.̶2̶.̶6̶ 7.1.3a-stable - Sqlite 3.32.3 - LazReport

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
Re: Script on report
« Reply #2 on: October 22, 2017, 06:18:47 am »
Sorry i was out for some days i going to try that tomorrow thanks so much...

 

TinyPortal © 2005-2018