02-26-2009 03:18 PM
I have test results that appear in a spreadsheet format--tab delimited text. I wish to print those results using the report generation tools using an excel format. Does anyone know how to scale the printout so that I can limit the width to one page?
02-26-2009 04:42 PM
Hi Eugene,
Good evening and I hope your well today.
I am not infront of a LabVIEW machine at the moment - so I cant check the API in the Report Generation Toolkit, but I do remember that printing doesn't have many options - I believe number of copies.. being one of afew.
I guess you could make sure the number of columns/rows weren't bigger than the max size for one page - but I guess your referring more to the options say Excel would give you when you print? If so, have you considered the ActiveX interface for excel. I have helped customers use this to print a range of pages before. I haven't tried it, but I am sure you could experiment alterting printout options.
Please let me know your thoughts, and i can help you with activeX stuff if you wish.
hope this helps,
02-27-2009 05:34 AM
James,
You are right about what I am looking for. Here's what I want to do. When I instruct the program to print, I want it to bring in the tab delimited text, lay it out in a spreadsheet, have the columns automatically adjust width to accommodate the widest data element, and then scale the entire printout so that it is equal to the width of landscape 8 1/2 X 11 paper.
My skills with activeX are very limited. I have looked for a property to allow scaling and could not find it. If you could help me with this need I would greatly appreciate it.
Thanks so much.
Eugene
03-02-2009 03:19 PM
Hi Eugene,
Thanks for the update and I hope your well today.
So for the delay...
Do you have any example code which I could use as a base to look into your issue further?
03-03-2009 07:37 AM
James,
Attached is some code I have tried along with an example tab delimited text file that I would like to print out. I want the printout to be landscape mode on 8 1/2 X 11 and I want it to automatically adjust to one page wide for the printout. I would like to have the gridlines printed as well.
Eugene
03-04-2009 07:20 AM
Hi Eugene,
Good afternoon and I hope your well today.
I was looking at your issue again this morning, and started coding some Excel Active X code but then came across the following
Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit: Introduction
http://zone.ni.com/devzone/cda/tut/p/id/3178
The example code includes cell bordering, setting borderes of an array of cells and report layout - landscape for printing.
I would recommend having a look through this, as I feel this largely applys to the area your looking at right now.
Please let me know how you get on,