09-12-2012 03:31 PM
Hi LSG,
Based on my testing today with your VI and TDR file, I'd say it looks like the LabVIEW Express Block for sending info to DIAdem to make reports terminates all strings on the first non-printable character. I didn't know that, I'm sorry for the bad advice in my first answer. It also looks like from the commented out code in your VI that what you want to send is a matrix of strings in 5 lines and 5 columns. If that is typical, wouldn't a 2D table display be better than a text box? How is that information getting into LabVIEW? Is it being read from file or received from communication with hardware or a TCP port? I'm thinking it might make more sense to send that info to string channels.
Also, we may pretty quickly need to switch to creating a TDMS file and calling DIAdem with a different VI that runs a reporting VBScript. I'm just trying to understand everything about your data flow before making my second attempt at a good suggestion.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-13-2012 12:33 AM
Hi Brad Turpin,
Thank you for your reply. I want to add a table in the report which can contain any number of row and coloumn. The data will be taken from mysql database. I have four systems. I want to make a general report vi so that it can be used in case of four systems altoghether. For system no. 1, let 5 types of output value is storing in database whereas for case of system no.2, 7types of output value is storing in database. Now when I need the report for system1 it should take 5 rows and if I want report for system 2, it should take 7 rows in the table. Again the value is uploading in database after a specific time interval. And when the user wants to get report he/she would select the time duration for the report. Based on that time duration, the no. of coloumn will be set at the table such as if the timimg interval of data uploading is 30mnts and the user wants to get a report for 2hours then 4no. of coloumn should be there. So, I need the no. of coloumn and row both dynamic.
In the report I need all the data of the given time duration in tabular format as well as graphical format. Where in graph I need time in x-axis and data in y-axis. Hopefully now it is clear to you.
I am very new in Diadem, so don't know anything about TDMS file or VBscript. Can you suggest me any tutorial?
09-13-2012 11:43 AM
Hi LSG,
OK, it's coming into focus, but there are a few outstanding issues I'm not clear on. You say that you want to report on 4 systems. Will those be 4 separate PDF files, or 4 separate sheets in 1 PDF file, or will that be 4 different colored curves on the same graph and 4 tables in 1 PDF file?
You say that the data is coming from a MySQL data base. In that case, why is LabVIEW calling DIAdem and sending it the data? Wouldn't it be easier for DIAdem to query the data from the MySQL itself? I assume you're wanting LabVIEW to call DIAdem at the correct time after which the data is guaranteed to be in the data base-- is there any other reason LabVIEW is calling DIAdem?
Having a variable number of rows in the REPORT table is a standard feature of the DIAdem table. For a variable number of columns, we'll need to run a VBScript to adapt the column count of the table. Will the table be on the same sheet as a graph or on its own sheet? You have 2 graphs on the TDR file you posted-- will there be a constant number of graphs per system, or will the system with 5 table columns need 5 curves on one or more graphs?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-14-2012 12:16 AM - edited 09-14-2012 12:17 AM
Hi Brad_Turpin,
The four systems are four standalone systems. So each system will create report for each. So four different reports (pdf files) should be there. Each report contains one table consisting data and two graphs, from that one is creating from the data and other is histogram of those data. There should be different curve with different colour for the different input parameters so as per my previous example, for system1 the first graph should contain 5different curves with different colours.
In my case, the report will be created untill a boolean button is getting true from the user. So, I have given the report generating vi as a subvi at the true part of that boolean function. As well as I have passed some parameters from the main vi to the report generating vi. This is the first reason to call diadem from labview.
As well as, whenever the user is requiring the report and clicking the report button, an option of choosing the time duration is also given to him/her. After getting the time duratuion, the vi has to select the data from database for that particular time duration. If there is no data for that time, then the vi is showing that no data is there for this time duration. This thing I have to do by LabVIEW. This is also another reason for calling diadem from labview. This report generation is a part of my total labview project. So I tried to call diadem from labview. The total thing along with report generation, I have done where the report was html report only. Now I want to make a pdf report.
I have no idea about VBscript. Please suggest me some tutorial. The table and the graphs should be in same sheet only. Hopefully it is clear now.
09-14-2012 05:47 PM
Hi LSG,
OK, this won't be the final solution for you, but it should be a big step in the right direction. For now I'm still having LabVIEW send DIAdem a TDR file path instead of a VBScript file path, so not all report details are perfect. The main thing is that I'm now writing all the info to a TDMS file and having LabVIEW call DIAdem to load that TDMS file and the TDR file. Once we switch to calling a VBScript, we can easily add PDF file output.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-17-2012 05:03 AM
Hi Brad Turpin,
Upto this level it is ok. But now how to move to VBscript and pdf output?
09-17-2012 11:11 AM
Hi LSG,
OK, I"m glad to hear nothing about the application so far bothers you. Here are the additional steps to use the PDF file path sent from LabVIEW to export the DIAdem REPORT to a PDF file and hide the DIAdem application and pop up the newly created PDF file. We're probably still not done, but hopefully now we're quite close to done.
Brad Turpin
DIAdem Product Support Engineer
National Instruments