DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you customize report "page" tabs so they are named automatically from data in the file, and can you add "pages" dynamically?

I am looking to develop a dynamic report template for our internal reporting use.  Namely, I am looking for the ability to do two things:
 
1)  Update the names of the tabs at the bottom of the report template (lets call them the "pages" of the report) from data stored within the file (for instance, label a tab with the "description" property from a given group or channel)
 
2)  Add additional tabs with associated graphs based on the number of groups a particular file has (for instance, a particular component could have a test life of 2000 hrs, but have been put through several different tests along the way.  It would be nice to show an overall life summary on the first tab, and then break out the data from the individual tests on seperate tabs with labels specific to that test, such as test #, etc.)
 
Any ideas on how this may (or may not) be done?
0 Kudos
Message 1 of 3
(3,722 Views)
Hello!
  1. There is no automatic way but you can use the GraphSheetRename command in a script to change the page names. Have a look at the GraphSheet... commands and variables in the help to get an overview.
  2. You can add pages with GraphSheetNew. These pages will be empty and you have to add the objects with the Obj... commands. IMHO this isn't verry simple! Another approach is to add pages via PicFileAppend from existing layout files. In the past this command wasn't verry fast perhaps it is today?! In one of our projects we made a layout with the maximum count of pages and delete the the unused from script.

Matthias

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

Hi SethRow187,

Let's take this one step at a time, starting with the one REPORT sheet per Data Portal Group request.  This is something that I do all the time, and I have developed lots of standard functions that I can re-use quickly and easily.  DIAdem has the basic functions which enable this, but it takes quite a few commands to get this to work the way you and I want with absolute control.

In the "Group Sheets General" example I'm attaching below, the same REPORT layout TDR file is loaded once for each Data Portal Group, and then subsequently altered programmatically so that all the Group references in the REPORT objects (graphs, tables, text boxes) are replaced with references to the current Group.  This results in N REPORT sheets where each sheet has explicit references to a particular Group.

In the "Group Sheets Simple" example I'm attaching below, again the same REPORT layout TDR file is loaded once for each Data Portal Group, but in this case no further change is made to each REPORT sheet after it is loaded.  This results in N REPORT sheets which are absolutely identical in content to each other and which all reference the default Group.  They appear different when refreshed because in each sheet, under its "Settings>>Layout Setup>>Worksheet Parameters" dialog there is a command configured to run each time the sheet is refreshed-- this command uses the current REPORT sheet index to set the corresponding Group to be the default Group.

In both cases the name of the Group is used for the REPORT sheet, which is convenient in that both Group names and REPORT sheet names are required to be unique, but you could use the Group description or any other property instead as long as you ensure that it has not already been used to name a previous REPORT sheet.

I also have scripts to concatenate the contents of N Groups into a new Group, located at the top of the Data Portal, and this combined with the below attached applications would give you the lead off overview REPORT sheet you mentioned.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 3
(3,696 Views)