10-08-2015 04:31 AM
Hello.
I'm trying to make a generic "engine" to generate test reports/certificates.
I've made a custom data type container Report Element, which I've used to make a local variable array of Report Elements called Report Element Array.
The data type contains some generic fields (element title string, element type string, etc.), and a container Element Data.
The idea is to increment the Report Element Array with Report Elements, and then fill the Element Data container with the fields from e.g. a Table Element container.
Either that, or to just add a field in the Report Element with the data type Table Element.
But I can't find a way to add fields in a container programmatically.
Anybody knows if this is even possible?
Solved! Go to Solution.
10-08-2015 05:49 AM
Found it!
Using a Statement step, pointing to the array of Report Elements by using the method NewSubProperty.
Ended up using the following statement:
Parameters.Report_Element_Array.InsertElements(GetNumElements(Parameters.Report_Element_Array),1,0),
Parameters.Report_Element_Array[GetNumElements(Parameters.Report_Element_Array)-1].NewSubProperty("Element_Data",PropValType_NamedType,False,"NSE_Report_Table",0)