DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting sheet from a report during run time

I am a VB programmer and new to NI product and just joined a team to help with report creation usign DIAdem and VBscripts.
I created the script, the script connects to a MYSQL DB loads the data into groups, let say a max of 10 groups is possible. the data is then populated into a report with tables and graphs.
I created the report with 10 sheets, if the loaded data is enough to create 10 groups everything works ok. The issue is when the retrieved data is less then 10 or 1st group has some data then 2nd group no data (blank) etc then the report is generated with 10 sheets and some with data and some blanks. The report is exported to a HTML page.
 
My question is how to select sheet numbers equal to group numbers during runtime, also excluding the empty groups from this report.
 
Thanks
0 Kudos
Message 1 of 2
(3,278 Views)

Hello Mikey!

My aproach would be to delete the unused sheets from the layout. You can use the command 'GraphSheetDelete' to do that. Be aware that deleting a page the indexing will be mixed up. Perhaps you can identify the sheet by sheet name in your application (e.g. channelgroup name = sheet name). It is an good idea to save the layout to a temporary file in advance to avoid the destruction of the layout if someone saves the modified layout by accident.

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 2
(3,276 Views)