12-15-2009 10:51 AM
I just upgraded from LV8.5 to LV2009 and when I tried to upgrade an existing LV8.5 application to LV2009 I found that the upgraded report generator toolkit uses the NI_report.lvclass data type to identify existing reports instead of a reference.
There are several places in this application that the report reference output is wired to a "type cast" function in order to flatten it to a numeric value. The numeric value is then evaluated to determine if a report exists and certain actions are taken depending on the result of the evaluation. (If no report the reference will flatten to 0, otherwise it flattens to a reference number). NI_report.lvclass cannot be flattened so there is a broken wire wherever this has been used.
So far I have been unable to successfully duplicate this logic using the NI_report.lvclass datatype. If I try to simulate a situation in which no report has been created by wiring a default value to the "report in" input of a report generator vi, (for example: "NI_report.lvclass:Get Report Type.vi") the vi returns default values with no error being generated.
Has anybody had a similar situation? Any ideas?
Thanks for any help.
Solved! Go to Solution.
12-15-2009 02:21 PM
I resolved this issue myself.
I discovered that wiring the NI_report.lvclass data type to the "Anything" input of "Flatten to String" results in a unique string output for each of the four possible report types as well as for no report created. From there I was able to resolve those strings to a numeric value which allowed me to create a vi that I could drop on the block diagram in place of the "type cast" vi.