I am generating an XML file through a main datawindow and several
nested datawindow reports. Is it possible through the USETEMPLATE
property to change one of the nested templates during the creation of
the XML file? The template needs to change based on data in the XML
file.
I am using PowerBuilder 11.5.
Here is my code to change the nested report template:
SELECT COUNT(*) INTO :s_lNCount
FROM notes
WHERE notes.document_number = :s_achDocNum
AND notes.associated = 'Y';
dw_pria.retrieve(s_achDocNum)
If s_lNCount > 0 Then
dw_pria.object.DataWindow.Export.XML.UseTemplate='t_pria_document'
Else
dw_pria.object.DataWindow.Export.XML.UseTemplate='t_pria_document_no_associated'
End If
lds_CLRISPriaXMLDocument.Retrieve(s_achDocNum)
s_achXMLData = lds_CLRISPriaXMLDocument.object.Datawindow.Data.XML
Help,
Mary