Page 1 of 2

Small bug in reports (font weight not working)

Posted: Wed Sep 26, 2012 8:12 pm
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

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

Posted: Thu Sep 27, 2012 4:14 am
by admin
Fike,

Well done!

Pat yourself on the back.

The fix will be in the next release.

Steven

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

Posted: Thu Sep 27, 2012 2:49 pm
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... :(

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

Posted: Thu Sep 27, 2012 6:53 pm
by admin
Fike,

I don't know what you mean.

Steven

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

Posted: Fri Sep 28, 2012 6:41 am
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

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

Posted: Fri Sep 28, 2012 9:25 am
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

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

Posted: Fri Sep 28, 2012 2:26 pm
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

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

Posted: Fri Sep 28, 2012 3:42 pm
by johan
Fike,

Great job, thanks,
Johan

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

Posted: Fri Sep 28, 2012 7:25 pm
by massiws
Fike,

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

Thanks a lot.

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

Posted: Sat Sep 29, 2012 5:20 pm
by Fike
Glad to help!

Regards,

Fike