Page 1 of 1

Conditional formating in PDF reports

Posted: Wed Oct 31, 2012 1:47 am
by Fike
First of all, I am thrilled to learn that nuBuilder can now be mashed into a web page using an iframe. This makes nuBuilder a perfect tool for developing interactive kiosk applications. Thank you very much for keeping the imporvement of this great tool.

I am currently using v2.7.4.7-12.08.29-Build516, but I will definiteley upgrade to the newest version ASAP.

In the version I am using, when I use conditional formatting for reports, the HTML reports display correctly. However, the PDF reports show the conditional formatting hashes and the value of the fiels. In other words, they display -#BOLD#Joe Bloggs- instead of Joe Bloggs.

I checked the "run_report_pdf_v2.php" file and I changed the line 148 from:

if(count($string_array) == 0){
to:
if(count($string_array) != 0){

PDF reports are now displaying correctly the formattings and values. However, if someone detects that additional changes should be made please tell me.

Regards!

Fike

Re: Conditional formating in PDF reports

Posted: Wed Oct 31, 2012 3:56 am
by admin
Fike,

I'll add this into the next build

Thanks

Steven

Re: Conditional formating in PDF reports

Posted: Tue Nov 06, 2012 5:40 am
by Fike
Hi Steven,

You are welcome, but I've just realized that this change made other pdf reports (with no conditional formatting) print duplicated rows, so changing the line 148 does not fix the problem properlly.

I will try to make the code work for both PDF reports (with and without conditional formatting) and post my findings.

Regrads,

Fike

Re: Conditional formating in PDF reports

Posted: Tue Nov 06, 2012 6:20 am
by Fike
I have tested the following change for PDF reports with and without conditional formatting, and both are printing correctly, so I hope this is a proper fix.

I replaced lines 148 to 152 in run_report_pdf_v2.php from:

if(count($string_array) == 0){
$data = $lineFormat['string']; //-- string with formatting removed
}else{
$data = $string_array[$ts];
}

to:

if(count($string_array) == 0){
$data = $lineFormat['string']; //-- string with formatting removed
}else{
$data = $string_array[$ts];
$data_arr = formatForPDFandHTML($data);
$data = $data_arr['string'];
}

Please note that lines 148 to 151 remain exactly the same than in the original code. I just added two lines between lines 151 and 152 of the original code.

Again, if someone finds out that this is not a proper fix, please post your findings.

Regards,


Fike

Re: Conditional formating in PDF reports

Posted: Wed Nov 07, 2012 1:31 am
by admin
Fike,

Thanks again, it will be in the next release.

Steven

Re: Conditional formating in PDF reports

Posted: Fri Nov 09, 2012 9:03 pm
by Fike
You are welcome Steven!

Regards,

Fike

Re: Conditional formating in PDF reports

Posted: Sun Nov 11, 2012 10:38 pm
by admin
.