Hi Chris,
I was sidetracked for a bit but I'm back on this now. And I've resolved the issue.
None of the above will ever work.
My scenario is very much like the one described in the PowerBuilder help referring to Nested Reports.
A freeform report with a tabular or grid report as the nested report, although I'm using an external data window for the nested report and it seems it has different properties when it's nested.
First, InsertRow(0) does not work for the nested report. Period.
I came across a discussion that said we could simply us dot notation to add a row.
I found that dw_1.object.dw_detl[1].object.empl_name[1] = "Mike Trainor" will add a row even though insert row had not been used.
Secondly, big issue, the rows must all be added after all the "Master datawindows" had been added. In other words,
if the above script is used after the first master is added it will vanish when the second master is added.
But this works after all the master have been added.
dw_1.object.dw_detl[1].object.empl_name[1] = "Mike Trainor" (this will add to the first master)
dw_1.object.dw_detl[2].object.empl_name[1] = "Evan Trainor" (this will add to the second master)
So all details are first added to a datastore which has all the columns contained in the nested report , plus one to identify which header it belongs to , then at the end I loop through all rows in the datastore and add them to the nested report. A bit of code is needed to compute the row number for the nested report. Each group should beginning at one.
I don't know if this a bug or not, but not being able to insert row should at least be better explained.
Regards, Mike
Super glad that you found a "workaround!!
Yes, the InsertRow() or even "Import" commands should work on a child DWO. If you have a simple repeatable test case, please open a Support Ticket.
Regards ... Chris