LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Graph using Report Generation Tool Kit

Hi all,
 
I am using Report generation toolkit for graph drawing on the Excel sheet.
 
My Problem:
 
I am configuring Window status as "Minimized" on New Report and using "Excel Insert Graph" for the generation of graph on Excel, here even if i give Minimized option on the new report it is not minimizing, it is pop ing up and closing. this is the problem i am facing so if any one has the solution for this please suggest me in this regards.
 
regards,
Suresh S
0 Kudos
Message 1 of 8
(3,970 Views)

This problem appears to be happening because we are activating the graph OLEObject before we modify it (adding data, changing fonts, etc.).  I experimented by running one of the Excel examples that ships with the Report Generation Toolkit (examples\office\MSGraph Examples.llb\Bar Graph (Excel).vi), and I was able to get Excel to stay minimized by modifying the following VIs:

vi.lib\addons\_office\_exclsub.llb\Excel_Set_Chart_Colors.vi
vi.lib\addons\_office\_exclsub.llb\Excel_Set_Chart_Axis_Font.vi
vi.lib\addons\_office\_exclsub.llb\Excel_Insert_Chart.vi

In each of these VIs, there is an Invoke Node of the _OLEObject class with the method "Activate".  I deleted this invoke node in each of these VIs, and simply passed through the reference wire.  Upon changing these VIs in this manner, the example ran fine without displaying the Excel window.  Now I don't know the immediate consequences of removing these method calls...perhaps the "Activate" method was required in older versions of Office, and it is no longer necessary (I am using Office XP).  Nevertheless, I will submit a bug report against the toolkit to investigate whether or not these "Activate" methods can be removed in the next version of the toolkit.

Let me know if you need any more assistance,
-D

0 Kudos
Message 2 of 8
(3,955 Views)
hi Darren,

Thanks for your reply, i try your method, i am using Microsoft 2003, graph is minimized while running but graph is not visible on the excel it is blank, but if i double click on it the graph appears, this is the problem i am facing by bypassing this invoke node. so suggest me if u have solution. keep in touch

regards,

Suresh S

s.suresh@apnagroup.com

 


0 Kudos
Message 3 of 8
(3,949 Views)

HI Suresh,

Unfortunately, that appears to be a bug with the ActiveX interface to Word.  Now that you mention it, I recall this being a problem in the past while testing the toolkit.  If I recall correctly, the problem doesn't happen with Office 2000 or Office XP.  It does happen in Office 2003, and I believe I have seen it while testing the Office 2007 beta as well.  The graph gets populated, but Word/Excel don't display the contents until you "activate" them by double-clicking.

So you'll have to make a decision based on these bugs in Office...do you want the window flash, or do you want a graph you have to double-click?

We've investigated all sorts of options to eliminate the "blank graph" bug in Office, but so far, we haven't come up with anything.

Good luck,
-D

0 Kudos
Message 4 of 8
(3,943 Views)

hi,

That means i can use office xp inorder to over come this popup problem by disabling the Active-OLE control on our LabVIEW, ok thanks for ur suggestion i will try out this and come back to u...Have a nice Day

Regards,

Suresh

0 Kudos
Message 5 of 8
(3,926 Views)

hi,

i tried ur method, using office xp too, but the condition is same, the blank graph appears, i have send the Vi which i used for testing, please send me the solution.

Regards,

Suresh S

0 Kudos
Message 6 of 8
(3,917 Views)

I was able to solve the problem by inserting an Excel Quit Graph.vi between your Excel Insert Graph.vi and your Save Report to File.vi.  When I made that change to your VI and opened the resulting .xls file in Excel after the VI finished running, I saw the graph immediately upon opening it.

Hope this helps,
-D

Message 7 of 8
(3,904 Views)

hi darren,

Thanks a lot for ur support, i tried this method working fine.. this solves my problem, i can implement this in my coding and can satisfy my customer needs.. thanks for your constant help...Keep in Touch

Regards,

Suresh s

0 Kudos
Message 8 of 8
(3,888 Views)