Recent

Author Topic: Script on report  (Read 3264 times)

eldonfsr

  • Full Member
  • ***
  • Posts: 157
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: 305
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 - Sqlite 3.32.3

https://gitlab.com/users/GAN__/projects

eldonfsr

  • Full Member
  • ***
  • Posts: 157
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