LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

paginated HTML reports

I'm generating HTML reports for a client. They are saved and printed. This was fine as long as the reports were within one page. But a new report is for three different rooms, three pages. They want the three reports in the same file, for ease of file archiving, etc. But then when it is printed, the 2nd and 3rd pages don't always start at the top of the paper, depending on the printer used, etc.
Does anyone have a work-around for this? My understanding is that HTML does not support page breaks. The New Page VI in the Report pallette does not work for HTML reports. All I can figure is to create three separate reports. I can't imagine that this is a very unusual situation. Don't other people write HTML reports for ease-of-viewing in a browser, but then want them to print in a particular way?

Thanks for any advice,
Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 6
(3,182 Views)
This VI works to start a new page in HTML reports:

Block Diagram > Functions > Report Generation > Report Layout > New Report Page.vi

However I just re-read your post and you said it wasn't working for you. Are you initializing the report as an HTML type report?

Something else to be aware of is that the HTML report VI's are just adding HTML to your report. You can do a lot of things in HTML that aren't necessarily supported in the NI Report VI's... just take one of the report VI's that operates on a report object, make a copy of it and modify it to do what you want by adding HTML. I have done this to customize my tables, charts, graphs, etc. There are plenty of HTML tutorials online.

Also, not in direct response to your question but somewhat related, it is also possible to compile your HTML reports into MIME HTML archives so that all the pictures are included into one nice neat little package. MIME encoding usually just converts the HTML to quoted-printable and the pictures or other binaries to base64 encoding. These are not supported by Firefox yet (which is unfortunate) but IE supports them natively--you can see what I'm talking about by saving an HTML report in IE as a complete archive .mht file then opening the .mht file in a text editor.
0 Kudos
Message 2 of 6
(3,166 Views)
m3nth,
Thanks for your reply. However, according to the online help (though it's not visible in the CTRL-H pop-up help window), the New Report Page subVI does not apply to HTML reports. Also, from the little I know about HTML, it would appear that HTML simply does not support page breaks. I was hoping someone could verify this second point, or provide a general work-around. How can one ensure that a multipage HTML document is printed with certain items at the top of various pages of the printout?
I believe I tried the New Report Page subvi with my html report and got an error. Have you actually used it successfully?

Thanks,
Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Message 3 of 6
(3,155 Views)
I use it on mine to do what you want just fine. Open the VI and you'll see that for report type = "HTML" (what it should be if you initialize your report correctly) then the following HTML text is inserted: <_P style="page-break-before: alway"_> (without underscores--necessary for this post to display it correctly)

I'm assuming you're using the latest version of LabVIEW but I could be wrong... I don't see anything about it not working for HTML since it's made to.
0 Kudos
Message 4 of 6
(3,146 Views)
Well I just found the note you were talking about at the very top of the full help. "You cannot use this VI with HTML reports."--even though there's functionality that works just fine for me using HTML reports! Another note in the help menu says Not in Base Package, so I'm wondering now if there is a base package VI that's different that doesn't have the HTML support.

At any rate, either the VI will work or you can modify it yourself to work by inserting the text into the report as my previous post stated.
Message 5 of 6
(3,140 Views)
m3nth,
Thanks! You are quite right. It works. I could have sworn I tried the New Page with HTML and got an error, but I guess that was just in my imagination.

Regards,
Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 6 of 6
(3,130 Views)