Recent

Author Topic: [Solved] LazReport and printing something yes or no  (Read 1636 times)

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
[Solved] LazReport and printing something yes or no
« on: December 13, 2017, 03:28:43 pm »
I have made a Lazrepolt and now i want to print a field that is dependent on 2 other fields.
To be more exact
In hockey you have 3 periods and if a game is tied you go to overtime. If not then there is no overtime.
So programming in Lazarus is easy
Code: Pascal  [Select][+][-]
  1. if (OvertimeGoalTeamA = 0) and (OvertimeGoalsTeamB = 0) then
  2.   Don't Print This Field
  3. else
  4.  Do Print This Field;
  5.  


But can this be done in LazReport ?
« Last Edit: December 13, 2017, 04:37:19 pm by madref »
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: LazReport and printing something yes or no
« Reply #1 on: December 13, 2017, 04:36:07 pm »
Next time i should think before i ask  :D


Found the solution myself.
Make a script in LazRaport for that field.
Code: Pascal  [Select][+][-]
  1.  
  2. if ([TQ_Rapport."Evo_Standaard_Per4"] = 9) and
  3.    ([TQ_Rapport."Evo_Goal_TeamA_Per4"] = 0) and
  4.    ([TQ_Rapport."Evo_Goal_TeamB_Per4"] = 0) then
  5. text := 'X'
  6. else
  7. text := ''
  8.  
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018