Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Small bug in reports (font weight not working)

Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Small bug in reports (font weight not working)

Unread post by Fike »

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
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Small bug in reports (font weight not working)

Unread post by admin »

Fike,

Well done!

Pat yourself on the back.

The fix will be in the next release.

Steven
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Small bug in reports (font weight not working)

Unread post by massiws »

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... :(
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Small bug in reports (font weight not working)

Unread post by admin »

Fike,

I don't know what you mean.

Steven
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Small bug in reports (font weight not working)

Unread post by Fike »

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
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: Small bug in reports (font weight not working)

Unread post by johan »

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
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Small bug in reports (font weight not working)

Unread post by Fike »

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
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: Small bug in reports (font weight not working)

Unread post by johan »

Fike,

Great job, thanks,
Johan
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Small bug in reports (font weight not working)

Unread post by massiws »

Fike,

you're right: changing both line 968 and 1337 in nureportbuilder.php fix the problem!

Thanks a lot.
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Small bug in reports (font weight not working)

Unread post by Fike »

Glad to help!

Regards,

Fike
Locked