LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report toolkit: Excel graph not always visible

Hello,

I use the Report generation toolkit to created a xls report and insert a graph. You can find attached an extract of my code (VI "Test").

Randomly, the graph is not properly displayed, it is empty. I just see the border filled with white. The graph appears if I move it or if I double click on it.

Do you have an idea why the graph is not always visible?

 

It seems that it's a known issue according comment "Attempting to avoid occasional problem where graph appears blank" in VI "Excel_Quit_Graph":
comment.PNG

 

I use LabVIEW 2017 SP1 32 bit, Office 2013, Windows 7.

graph visiblegraph visible

graph not visiblegraph not visible

0 Kudos
Message 1 of 8
(2,940 Views)

Appears to be an Excel problem, not a LabVIEW problem.  NI engineers were trying to find a way around the Excel bug but apparently it doesn't work.

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 8
(2,913 Views)

Well, I can partly confirm that your code does not work in LabVIEW 2018 with Excel 2013.  I also took the liberty of replacing the deprecated New Report function with the current replacement, Create Report, which made no difference.

 

I also ran the Revised "Generate Excel Report" example that I posted on this Forum in 2014 (search for Revised <Quotation mark>Generate, and it should pop up).  I ran it with the deprecated New Report and the current Create Report and got a nice Report with Graph.  One should be able to start from "what works" and gradually modify it, one step at a time, to "what fails" (or vice versa) and get more insight into the failure ...

Output of Revised "Generate Excel Report"Output of Revised "Generate Excel Report"

Bob Schor

0 Kudos
Message 3 of 8
(2,892 Views)

Hello,

Your VI works because you don't call "NI_Excel.lvclass:Excel Quit Graph" VI.

I don't know if it's mandatory to call it after creating a graph...?

 

Edit: it is much better to call it because it closes all graph ActiveX references.

0 Kudos
Message 4 of 8
(2,866 Views)

@Romain.P wrote:

Hello,

Your VI works because you don't call "NI_Excel.lvclass:Excel Quit Graph" VI.

I don't know if it's mandatory to call it after creating a graph...?

 

Edit: it is much better to call it because it closes all graph ActiveX references.


Let me see if I understand what you are saying -- I make graphs in Excel using the tools that LabVIEW provides with the RGT, and it works.  You say "it works because I don't call (some function that may or may not be necessary, but doesn't seem to be prominently featured in the RGT".  You've demonstrated that if you do it your way, it fails, while if I do it "my" (and "LabVIEW's") way, it works.  I guess I'll do it my way, as it makes more sense to do something that works, rather than call an extraneous function that makes it fail.

 

Bob Schor

0 Kudos
Message 5 of 8
(2,850 Views)

@Bob_Schor wrote:
You've demonstrated that if you do it your way, it fails, while if I do it "my" (and "LabVIEW's") way, it works. 

 


What do you mean by LabVIEW's way?  This is a LabVIEW VI from the Report Generation Toolkit.

2018-12-06_9-16-06.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 8
(2,842 Views)

I've seen this a few times and realized that if you stretch the bottom right of the graph it will reappear. I didn't do any extensive trials but by adding a vi that increase the height and width by 1% before closing the graph seems to work.

 

Ben64

0 Kudos
Message 7 of 8
(2,837 Views)

@aputman:

 

     Son of a gun, you are absolutely right!  I never noticed that function, and (clearly) have never used it.  I know I've (recently, meaning using LabVIEW 2016) written code that created Excel Reports with multiple graphs, and never called this function -- the code worked just fine, so maybe (a) I was just "lucky" that omitting a "necessary" function didn't break my code, (b) the function really isn't "necessary", and in some cases it will "break code", or (c) the function is OK, but it might not be being used in the proper manner.  

 

     I just looked at my code.  I've got data from an experiment monitoring multiple Stations, and want to write an Excel Report consisting of multiple Sheets, one per Station.  The report has some tabular data plus two graphs, one a scatter plot and one a line graph, per sheet.  I do not use Excel Quit Graph anywhere in this code (as evidence of my ignorance that such a function was part of the RGT).  The basic logic is I open a (blank) WorkBook, fill in as many WorkSheets as I have Stations, each WorkSheet getting two Graphs, then Save Report to File and Dispose Report (which closes Excel).  None of my Graphs are blank.

 

     What can I say?  This works, and apparently using Excel Quit Graph might not.  I think I'll continue not using it until a need arises ...

 

Bob Schor

 

P.S. -- just saw Ben's Reply, saying "stretching the Graph slightly might cause the Graph to reappear".  Still sounds like a bug.  BS would say "Not using Excel Quit Graph will cause the Graph to not disappear" (I hope I said that correctly -- there are too many negatives ...).

0 Kudos
Message 8 of 8
(2,833 Views)