07-26-2016 09:52 AM
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
Solved! Go to Solution.
07-26-2016 10:59 AM
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.
07-26-2016 11:01 AM
Also, make sure you are disposing the report afterward, and it will close the window for you automatically.
07-26-2016 11:44 AM
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.
07-27-2016 03:44 AM
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.