LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generation of book1 report when New Report vi

Solved!
Go to solution

Hi All,

 

I have one small and quick question. When I use New Report in program book1 report will be generated. Is there any way i can stop displaying my report to user? Because i have a program to read values from NI chassis and for every value change of my modules report is getting generated and displayed to user. Because of this by the end of program almost 20 to 30 report is generated and displayed, if i run program for 2 minutes!!

 

Note: Report type is excel 

0 Kudos
Message 1 of 5
(3,576 Views)

One of the inputs for creating a new report is the window state. If your report program (Excel, Word, etc...) is going to be closed before your program runs, then set this input to "Unchanged". If it is going to be open, then you can set it to "Minimized" and at least the user won't see it.

0 Kudos
Message 2 of 5
(3,561 Views)

Also, make sure you are disposing the report afterward, and it will close the window for you automatically.

0 Kudos
Message 3 of 5
(3,560 Views)
Solution
Accepted by topic author P_innovative

If you are getting 20-30 report windows open, it sounds like you are creating the report inside of a loop.  Create the report reference outside of your loop, pass it into and write to the report inside of the loop and then close the report after the loop has finished executing. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 5
(3,552 Views)

Hi,

 

I tried both soultions provided. Both solutions were working. But again in 1st soltion faced problem as i am creating report in loop where report was getting generated but user cant see it. I have to save report upon users input and if i open my saved report then my report generated was opening again, almost 20 to 30 report according to first solution.

so i tried second solution provided by aputman which seems to be quite effective. i created report reference in event case inside loop but upon value change of my boolean input and windows state no change. Now neither report is getting generated nor getting 20 to 30 reports.

thanks for your reply and solution.

0 Kudos
Message 5 of 5
(3,517 Views)