03-15-2016 07:27 AM - edited 03-15-2016 07:36 AM
Hello,
I have a script that sets the background colour of a 'Text' element on a report red or green depending on if the test was a pass or fail. What I find is when I run this normally the pdf export is fine.
However, if the script runs with DIAdem minimised (my preferred workflow for this script) the background colour is not exported to the pdf, although it is there in the report. Everything else about the report is fine, it is just the background colour.
Has anyone got any ideas please? I've tried using a 'TextObject' instead but I don't seem to be able to set the background colour for that through the script interface.
I'm using DIAdem 2015 64-bit.
Thanks,
Martin
This is what I use to set the colour. It works fine unless DIAdem is minimised:
Dim bgCol : bgCol = eColorIndexRed
If Data.Root.Properties("TestPassFail").Value = "Pass" Then bgCol = eColorIndexGreen
Call Report.Sheets(1).Objects.Item("Text1").BackgroundColor.SetPredefinedColor(bgCol)
03-15-2016 09:45 AM
If I replace Text1 with a single-row table and then use a user command and OnDrawingCell to colour the background, it works fine when minimised.
However, I have quite a few text items in the report that I colour in this way which I'd like to avoid replacing if possible.
03-21-2016 01:55 PM
Hi Martin,
R&D set up a similar scenario with DIAdem 2015 64bit and was unable to reproduce the problem you report. Could you please send in a sample data set, your TDR file and your VBScripts to appply the conditional coloring? If we can reproduce the issue, then we can investigate it.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-24-2016 09:58 AM
Hi Brad,
I've upgraded to DIAdem 2015 SP1 64bit and I can't recreate it now either - it looks like it has been fixed.
Thanks,
Martin