LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph reference to report generator issue when program is compiled

Solved!
Go to solution

I am using Simplicity PDF generator to add a XY Graph to a PDF report, same handle is used in Excel report and works fine. The XY Graph shows up fine when the code it run in development mode, when run as executable, the graph insert routines fail for lack of finding the temp *.bmp fle for the graph 1172. See attachments. Anyone have any idea why the loss of the handle/temp graph error?

Download All
0 Kudos
Message 1 of 6
(2,659 Views)
Solution
Accepted by SunshineDesign

As you said, the error simply says that it can't find the file, which most likely means that the file wasn't created.

 

My guess would be this - you're creating the graph in the subVIs with the + and control icons (which is presumably PDF_Generator.Writer.AddImage.vi) and the VI which is shown in the image never has its FP displayed.

 

By default, LV removes the FP of all the VIs going into the EXE unless it decides it's going to need the FP. If the FP is removed then the image of the control cannot be accessed and that would presumably prevent the file from being created. The easiest way to confirm this is to create a static property node for one of the controls on the front panel. This will force LV to keep the FP when building the EXE.

 

If that doesn't help, then you need to see exactly where the BMP file is supposed to be generated and see if you can log an error from there.


___________________
Try to take over the world!
Message 2 of 6
(2,640 Views)

Thanks for the suggestion tst. You may be on to to something. I'll give some things along that line a try and get back to let you know.

0 Kudos
Message 3 of 6
(2,623 Views)

Tst your solution did work. Interestingly the Create Excel Front Page routine also uses the same technique and the graph comes up in that

report fine. It was just the PDF one that had the issue. Changing the form properties, so the front page displays briefly while the report

is being generated, resolved the issue with the graph plot handle to the temp file and it comes up in when run as an executable fine now.

0 Kudos
Message 4 of 6
(2,606 Views)

Would like to thank tst for the solution on this, and add a few tweeks: 

 

In VI Properties -> Window Appearance; choose "Custom" and click the "Customize" button. Use the following settings:

 

Check "Show front panel when called" and "Close afterwards if originally closed", uncheck "Show front panel when loaded".

Check "Window runs transparently" and set the value to 100%.

-> These settings ensure that the front panel is opened, but it is opened in "Invisible mode", thus eliminating the brief display of the window to the (presumably "dumb") user.

 

I additionally set more or less all the other settings to minimize user interruption of the process. 

 

 

Best regards,

Jarle Ekanger, MSc, PhD, CLD
Flow Design Bureau AS

- "The resistance of wires in LabVIEW is not dependent on their length."
0 Kudos
Message 5 of 6
(2,523 Views)

If you want this to be more clear, you can also do all of this in code - just call the VI's FP.Open method when it starts running (and set the state input to hidden) and call the FP.Close method when it's done. This should allow you to document exactly what you're doing and not to have someone change it by accident.


___________________
Try to take over the world!
Message 6 of 6
(2,518 Views)