LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NIReport - unknown error (one more time...)

browsed the board, found many messages but no help.
Running the sample "nirsample"-project i get an runtime error at the line NIReport_Print with return-value =-4.

Many questions till CVI6 i found in the board and did what they told me to do:

1. SendPrintAttribute()..the printer is found
2. PrintPanel()..is correctly done
3. NI_ReportGetPrinters ()..printer is listed correctly

Any idea?

Best regards

(CVI 801 XP SP2)
0 Kudos
Message 1 of 5
(3,688 Views)
Jumbojetjames,

the error is known to occur with wrong settings of margins of the page for certain printers. Please check if the report fits the printer.
You can change settings of the margins with for example.
NIReport_SetReportAttribute (reportHandle, NIR_ATTR_LEFT_MARGIN, 2.5);

hope this helps,
Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(3,647 Views)
norbert,

1. the report generator seams to have difficulties with some printers. I took another old XEROX - runs ok.

2. now I want to printout the reports over a virtual PDF-printer. this isnt a problem, but I'd like to tell the printer the name of the PDF-File, the directory etc. before printing. is there a solution ?

best regards to munich (aus leipzig)

simon
0 Kudos
Message 3 of 5
(3,641 Views)
Simon,

maybe this forumsentry helps you to find a workaround. There is no way (at least to my knowledge) how you can programmatically set the filepath/name in another way.

Regards,
Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(3,601 Views)
norbert

found a good tool named "PDSMailer". you can include into the printed text some things like" @@sfC:\test\test@@ and the tool interprets these things as name of file, directory etc. correcltly. See www.pdfmailer.de.

thanks and regards

Simon
0 Kudos
Message 5 of 5
(3,589 Views)