I am using version 2.7.4.7
When I set any field or label with font weight to 'bold' in the report builder, my html report was not printing with bold letterts those fields/labels.
Looking at the code that builds the report ('sat_report_display_code' in zzsys_activity table) I found that in the following lines:
$this->Controls[1]->FontSize = '16px';
$this->Controls[1]->fontWeight = 'bold';
$this->Controls[1]->FontName = 'Arial';
all variables/arrays names began with capital letters except 'fontWeight'.
Therefore I replaced 'fontWeight' for 'FontWeight' in line 968 of 'nureportbuilder.php'. Then I opened the report builder, saved the changes and verfied that 'sat_report_display_code' now says:
$this->Controls[1]->FontSize = '16px';
$this->Controls[1]->FontWeight = 'bold';
$this->Controls[1]->FontName = 'Arial';
I printed the report and now it has bold letters!
Fike
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Small bug in reports (font weight not working)
Re: Small bug in reports (font weight not working)
Fike,
Well done!
Pat yourself on the back.
The fix will be in the next release.
Steven
Well done!
Pat yourself on the back.
The fix will be in the next release.
Steven
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Small bug in reports (font weight not working)
Fike,
maybe, have you made other changes?
I try what you say, but it didn't work: bold characters are displayed on screen, but not on paper...
maybe, have you made other changes?
I try what you say, but it didn't work: bold characters are displayed on screen, but not on paper...

-
- Posts: 79
- Joined: Thu Oct 20, 2011 9:13 pm
Re: Small bug in reports (font weight not working)
Massiws,
That was the only change I made to the program in order to make it work. Before that, I looked at the html report's source code (right clicking on the report's browser windos) and I noticed that the CSS styles said...font-family:Arial;font-weight:;...so I thought that there was missing something between : and ; at the left of 'font-weight'.
After the change I mentioned, the CSS styles say: ...font-family:Arial;font-weight:bold;...and the characters are displayed on the screen and printed on paper in bold letters.
Take a look at your report's source code. If the CSS styles say: ...font-family:Arial;font-weight:bold;...the problem could be somewhere else; maybe in your browser's settings or your printers' configuration.
Steven,
Thanks for the pat on the back!
Regards,
Fike
That was the only change I made to the program in order to make it work. Before that, I looked at the html report's source code (right clicking on the report's browser windos) and I noticed that the CSS styles said...font-family:Arial;font-weight:;...so I thought that there was missing something between : and ; at the left of 'font-weight'.
After the change I mentioned, the CSS styles say: ...font-family:Arial;font-weight:bold;...and the characters are displayed on the screen and printed on paper in bold letters.
Take a look at your report's source code. If the CSS styles say: ...font-family:Arial;font-weight:bold;...the problem could be somewhere else; maybe in your browser's settings or your printers' configuration.
Steven,
Thanks for the pat on the back!
Regards,
Fike
Re: Small bug in reports (font weight not working)
Steven, Fike,
There seems to be another bug.
If you open report builder (add activity) in an existing report font weight of all the fields / labels are set to normal. After save you loose your settings you made earlier.
Johan
There seems to be another bug.
If you open report builder (add activity) in an existing report font weight of all the fields / labels are set to normal. After save you loose your settings you made earlier.
Johan
-
- Posts: 79
- Joined: Thu Oct 20, 2011 9:13 pm
Re: Small bug in reports (font weight not working)
Johan,
You are right. When the report is opened again using the Report Builder button, the bold letters go away. That bug is caused due to the firts change I suggested.
I found that line 1337 of the same file ('nureportbuilder.php') says:
$string .= "'$rControl->fontWeight',
So I just replaced it for:
$string .= "'$rControl->FontWeight',
And now the reports are showing bold letters again when opened with the Report Builder button.
Regards,
Fike
You are right. When the report is opened again using the Report Builder button, the bold letters go away. That bug is caused due to the firts change I suggested.
I found that line 1337 of the same file ('nureportbuilder.php') says:
$string .= "'$rControl->fontWeight',
So I just replaced it for:
$string .= "'$rControl->FontWeight',
And now the reports are showing bold letters again when opened with the Report Builder button.
Regards,
Fike
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Small bug in reports (font weight not working)
Fike,
you're right: changing both line 968 and 1337 in nureportbuilder.php fix the problem!
Thanks a lot.
you're right: changing both line 968 and 1337 in nureportbuilder.php fix the problem!
Thanks a lot.
-
- Posts: 79
- Joined: Thu Oct 20, 2011 9:13 pm