I don't know what you do to import the json into the datawindow, but you would have to do the same thing for the nested dw.
To get a reference to the nested dw, you can use GetChild().
You might have to temporarily set the processing to 5 for the GetChild to work if you're dealing with nested reports:
string ls_restore
datawindowChild ldwc
ls_restore = dw_1.object.datawindow.processing
dw_1.object.processing=5
dw_1.GetChild("name_of_column_with_dddw_or_report", ldwc)
// now you can treat ldwc as if it's a normal dw:
.....
ldwc.Import......
// restore dw_1 to its original type:
dw_1.Modify("Datawindow.Processing=" + ls_restore)
Something like that?
GetChild() will give you one same result for all rows.
What is it that you want to do?
Can you export your datawindow(s) so I get an idea of what we're talking about?
regards
Well, I want to do following. I have a DataWindow (lets call it the parent one). Inside this dw, in its detail, there is report (child). In some occasions, there are multiple rows in the parent DataWindow, so there are multiple child reports. I need to import different JSON into each rows report. Is it possible?
regards
I'm not 100% sure, but I don't thinks it's possible. Whatever you'll import, using the reference obtained with GetChild(), will affect to the report on all of the rows.
Maybe one way around it, would be to import the JSON data for ALL of the rows and then somehow set the rownumber or some other value to an added field on the report. The report would then use that value to filter out all of the JSON imported data, which does not apply to that row of the main dw.
So in the rowfocuschanged of the main dw, you would have to do a GetChild and assign that "rownumber/value" for the filtering to take place.
Still, this way also the other rows would be filtered at that point, but at least it would have the correct data when "working" on a specific row. If you would like to display, print or export this dw, then that solution would be no good at all.
Maybe a better solution is:
Have as much reports as rows you might have. They can all be the same report, but the name of the control on the dw has to be different. Make them all invisible and add this to the expression of visibility of the report:
if (getrow() = currentrow(), 1, 0)
Something like that.
This way, your import of JSON will be specific to a single report control.
regards