Recent

Author Topic: [SOLVED] Showing something or not in a report  (Read 1432 times)

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
[SOLVED] Showing something or not in a report
« on: October 21, 2018, 06:36:26 pm »
I have a report defined as
Code: [Select]
frReport_Evaluatie: TfrReport;It is works perfectly but is it possible to NOT show a part of it depending on 1 or 2 values?


Let me explain it more. If you look at the picture i added as an attachment the first blue rectangle (Score) is the dependent part to let the second blue rectangle (Overtime) been shown.


The first one keeps the score of a game and is defined with the following code:
Code: [Select]
[TQ_Rapport."Goals_A"] - [TQ_Rapport."Goals_B"] ( [TQ_Rapport."Evo_Goal_TeamA_Per1"] - [TQ_Rapport."Evo_Goal_TeamB_Per1"] / [TQ_Rapport."Evo_Goal_TeamA_Per2"] - [TQ_Rapport."Evo_Goal_TeamB_Per2"] / [TQ_Rapport."Evo_Goal_TeamA_Per3"] - [TQ_Rapport."Evo_Goal_TeamB_Per3"] / [TQ_Rapport."Evo_Goal_TeamA_Per4"] - [TQ_Rapport."Evo_Goal_TeamB_Per4"] )


If [TQ_Rapport."Evo_Goal_TeamA_Per4"] AND [TQ_Rapport."Evo_Goal_TeamA_Per4"] are both 0 then the Overtime part must not been shown.

Is that possible?

p.s. i have also included the report.
« Last Edit: October 22, 2018, 03:25:49 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

GAN

  • Sr. Member
  • ****
  • Posts: 370
Re: Showing something or not in a report
« Reply #1 on: October 21, 2018, 10:10:13 pm »
Code: Pascal  [Select][+][-]
  1. if [ condition ] > 0 then visible:=true else visible:=false;  

This code must be placed in the Memo that you need to show/hide.
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

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Showing something or not in a report
« Reply #2 on: October 22, 2018, 03:25:38 pm »
Thanks...
It Works
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