- Paul Shue
- PowerBuilder
- Thursday, 22 February 2024 10:59 PM UTC
I have a nested dw (dw_data) which has a subreport dw_1. I want to copy all the data from the nested dw (dw_1) to another datawindow (dw_fake) since I cannot do a saveas on anything but the parent. I tried to loop thru parent and use rowscopy but that does not work. Is there a better way to do it? If I cannot use rowscopy I am getting the dw_1 data for each row in the parent in the loop into an any array la_any so after the first iteration of the loop is there a way to append the subsequent rows nested data to what is already there in dw_fake?
any la_any[]
//(for dw_data)
For ll_loop = 1 to ll_rowcount
la_any = dw_data.Object.dw_1[ll_loop].object.data
ll_upperbound = UpperBound(la_any)
IF ll_loop = 1 THEN
dw_fake.object.data = dw_data.Object.dw_1[ll_loop].object.data
ELSE
dw_data.Object.dw_1[ll_loop].Rowscopy(1, ll_upperbound, Primary!, dw_fake, dw_fake.Rowcount(), Primary!)
END IF
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.