12-15-2009 03:01 PM
CVI hangs when I call NIReport_Print unless I step through that section for the program. I have it printing to a pdf driver to keep from wasting paper while I debug the application. It seems to work most of the time printing to an actual printer, but I haven't really tried it much. It doesn't get to the popup to ask for the file name even when set for the pdf printer. I can terminate the program, but not force a breakpoint once hung. If I set a breakpoint before the call, I can step through it and works fine. I added a printf statement just before the call (for debug) and it improved it so that it doesn't hang some of the time. I've tried earlier versions of CVI and get the same result.
12-16-2009 11:11 AM
Which PDF printer are you using?
If breaking before the print function or using the printf improved the situation, then maybe you need a delay.
What is the last operation you do on the report before the printing?
12-16-2009 03:49 PM
I'm using Adobe's version for the pdf printer. It works fine with any other application.
I call the NIReport_NewLine function to finish the report just before printing it. I'll try adding a longer delay to see if that resolves the issue.