Page 1 of 1

Fix - Yearly Report (PDF) showing incorrect Max Temperature

Posted: Thu Jan 02, 2020 12:35 pm
by MonyMony
If you look at the Yearly Reports there is an option to generate a PDF version. While this is likely a feature that does not get used often, if you do run it you will notice that the Maximum Temperature shows 0.
Before Fix
Before Fix
Screen Shot 2020-01-02 at 7.27.06 AM.png (77.47 KiB) Viewed 5646 times
To correct this open the file reportYearlyPDF.php (found under the ../pages/station directory) and around line 503 look for this line:

Code: Select all

<strong>'.number_format(convertT($data['monthlyMaxTmax']),1).'</strong>
Edit that line so that is becomes this:

Code: Select all

<strong>'.number_format(convertT($data['annualMaxTmax']),1).'</strong>
The problem is the variable being called was listed incorrectly and needs to be changed to 'annualMaxTmax'. Once that is done and saved to your site the PDF yearly summary will work correctly.
After fix
After fix
Screen Shot 2020-01-02 at 7.34.18 AM.png (78.67 KiB) Viewed 5646 times
Hope this is useful to some of you!

Re: Fix - Yearly Report (PDF) showing incorrect Max Temperature

Posted: Thu Jan 02, 2020 3:22 pm
by Jolumarali
Perfect, I found the error without ever solving it.
thanks and best wishes 2020

Re: Fix - Yearly Report (PDF) showing incorrect Max Temperature

Posted: Sun Jan 12, 2020 10:57 am
by Michael
I have another problem in yearly report.

In Tab Summary the warmest day in year was 25.07.2019 with temperatur max. 38,7 °C.
In Tab Extrema the warmest day in year was 25.07.2019 with temperatur 28,93 °C.

The same problem with coldest day.....

s. Attachment

Michael

Re: Fix - Yearly Report (PDF) showing incorrect Max Temperature

Posted: Sun Jan 12, 2020 12:33 pm
by Jolumarali
Hello
These are the coldest and warmest days at average temperatures in Extremes