LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MS Report Generation

Hallo Folks,

 

one question please. When using the report generation toolkit, I would like to read a data file in ASCII and make a report in MS Excel. So the file contains a header and the actual data, i.e. 6 different columns for ach variable acquired. How do I make several graphs in one report. Generally, is it OK to make a template in Excel (which I did) which already contains the graphs that are updated by the data file ? If not I suppose i have to make the empty template into which I insert the plots from Labview. But then I use the approach to insert a new graph and then additional functions as scaling, setting the object color and so on. I tried to run everything in the way that first plot is made and edited, then I close the activeX reference of the plot and pass on the ref. number of the report into the additional charts. Somehow it does not work since I fill the header data into the report but no plots are actually shown. Error is -4110 (NI_ReportGenerationToolkit.lvlib:Excel_Get_Range.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Chart Options.vi -> MS Excel Report. Trial.vi). I suppose from debugging that one source of the code is that it actually closes the report befor the plots are even made. I suppose this can be avoided by data flow when the closing actuallly waits for the error from the previous functions, i.e. making the charts. The fundamental question, however, is if I have to make the plots in parallel (splitting the ref. number and error nodes) to each of the graph, or whether i can make it in a series. I attach the code for illustration. Any help is appreciated.

 

Yours Sincerely

 

Karel 

 

 

 

0 Kudos
Message 1 of 4
(3,374 Views)

Hi Karel,

 

I'm afraid I don't really understand what you are trying to do. This is what I got:

 

- you have 6 different graphs in labVIEW (6 columns of data) that you wish to display in one Excel  graph (or should each column have its own graph?).

- you want to know whether this can be done in parallel, or whether it must be done sequentially.

 

To the second point, I see no reason why you couldn't write to different graphs in parallel. You wouldn't know however which graph would come first unless the program could sequence that correctly. The writing to an Excel graph will still be sequential because only one can be written at a time, but you can create parallel paths in labview. Whichever gets to that VI first will write first and the others will wait in a queue. I hope this is clear.

 

Once again, you should probably try to provide a clearer explanation so that I can be sure that I understand and am not giving you useless tips.

 

Best regards,

0 Kudos
Message 2 of 4
(3,338 Views)

Hallo Joseph,

 

thank you for the feed back and sorry for the unclarity. I would like to have a small vi that opens a datalog file which contains six variables (one indepent time column) and all other dependent ones. I point the vi to my template in excel which does have user information and experiment related information so far with empty values. No graphs are in this  excel template at the moment of opening. Upon reading the datalog file the values in cells are extracted from the datalog file header and I want to make five graphs in excel from the data.

I mean first of all I do not want to have more plots in one graph since excel in my opinion is clumsy at that, at second the data are more readable one at a time. What I am not sure about is the way I make the graphs. Menaing I open the report, fill in the cell values than I make one graph, edit it, close its activeX reference make another one and so o until the last graph is made. In the end I close the activX reference of the report itself and save the report under a specified name. In other words I am not sure of is when closing the first graph the reference of the report is still the same ? I read in the LV Help that the additional graph function like scaling and updating do not work with the graph that is created directly in Excel, so by that I understand  that I have to create the graphs from within LV code. Otherwise, I think it would be much easier to make the graphs in the excel template do all the formatting, scaling and labeling in excel and each time I call the vi it just updates the data in cells and in the graphs as well. Thank you and have a nice day.


Yours Sincerely


Karel 

0 Kudos
Message 3 of 4
(3,330 Views)

Hi Karel,

 

have you seen this example? It lets you populate a graph in an excel template from LabVIEW.

 

Adding and Customizing a Graph Using the Report Generation Toolkit for MS Office

http://zone.ni.com/devzone/cda/epd/p/id/102

 

I believe this may be able to do what you want.

 

Let me know if this helps.

 

Regards,

0 Kudos
Message 4 of 4
(3,311 Views)