I'm duplicating some pages
....
reportResult.renderedPages.clear();
numpages=report.renderedPages.count;
for (var index = 0; index < numpages; index++) {
	reportResult.renderedPages.add(report.renderedPages.getByIndex(index));
}
And I wanted to change one Textfield inside the newly added pages
Is this possible?
Thanks
JB
			
			
									
									
						Duplicate pages and change value of a field
Re: Duplicate pages and change value of a field
I´m adding the same page several times...
And i want to change a field with this code:
.....
var page = report.renderedPages.getByIndex(index);
reportResult.renderedPages.add(page)
reportResult.renderedPages.add(page)
....
const control = page.components.getByName("Text37");
if (control) control.text = "'newtext'";
reportResult.renderedPages.add(page);
....
but it changes the text field in every page added, and not only in this one...
Is there a way around?
Thanks
			
			
									
									
						And i want to change a field with this code:
.....
var page = report.renderedPages.getByIndex(index);
reportResult.renderedPages.add(page)
reportResult.renderedPages.add(page)
....
const control = page.components.getByName("Text37");
if (control) control.text = "'newtext'";
reportResult.renderedPages.add(page);
....
but it changes the text field in every page added, and not only in this one...
Is there a way around?
Thanks
- 
				Lech Kulikowski
 - Posts: 7470
 - Joined: Tue Mar 20, 2018 5:34 am
 
Re: Duplicate pages and change value of a field
Hello,
Please send us a sample that reproduces the issue for analysis.
Thank you.
			
			
									
									
						Please send us a sample that reproduces the issue for analysis.
Thank you.