LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print number of pages with Report Generation toolkit

I use the report generation toolkit and the Print Report.vi to print a table and some text extracted from a MS Access database. The result of this is a print out that takes up several pages.
 
Now, on each page i want something like (Page x of y), and I do not want to buy more expensive NI packages for this simple thing. I know it should be possible since the Report Express vi can do it --- which for me is a useless vi.
 
I do not consider it a nice solution to try and keep track of the number of pages myself by dividing the table into more tables and use the new page vi between each "page table". This I would not like to do since depending on paper size, font size, and length of text strings in each cell this will be virtually impossible.
 
By moving into the Print Report.vi I've tried to see if I somehow can extract the info --- I've not found anything usefull but expect a workaround to possible.
 
Any suggestions?
 
Cheers,
Martin
0 Kudos
Message 1 of 6
(3,316 Views)
... and btw I use LV 7.1
0 Kudos
Message 2 of 6
(3,313 Views)

Hi Skinny,

There are some tokens you can use in the headers and footers of Standard Reports generated by the Report Generation VIs.  If you take a look at [LabVIEW]\examples\reports\TextReportExample.llb\Text Report Example.vi, you'll see that the right footer text of the report has the token <pagenofm>, which generates a footer of the form "1 of 10", to indicate page 1 out of 10 pages.  There's also another tag you can use, <page>, that just lists the page number itself without a total number of pages.  If you look at the help for the Set Report Header Text.vi or Set Report Footer Text.vi, you'll see a link in the help for all the different "tokens" you can use with the report header and footer.  Actually, now that I think about it, you can use these tokens anywhere in the report, including the body text.

Good luck,

-D

Message 3 of 6
(3,307 Views)
Thanks! I'll implement when I'm back at work next week. For now I'll settle with writing my thesis... - Martin
0 Kudos
Message 4 of 6
(3,291 Views)
Thanks - as expected: it worked out top-dollar!
0 Kudos
Message 5 of 6
(3,270 Views)

Thank you Darren. 8 years later and your still helping people with this posting!

Jim

LV 2020
0 Kudos
Message 6 of 6
(2,414 Views)