Duplicate page with subreports inside.
Greetings,
I am trying to copy a report N number of times by a variable value, to do this by code I created this script:
public class ReportScript { bool primeraCopia = true; Double num_copias = 2; private void ImprimirCopias(object sender, EventArgs e) { TextObject txt = Report.FindObject("Text32") as TextObject; if(primeraCopia){ primeraCopia = false; Child1.Visible = true; for (int i = 1; i <= num_copias; i++) { txt.Text = "ES COPIA"; ReportPage newPage = new ReportPage(); newPage.AssignAll(Page1); Report.Pages.Add(newPage); } } } }
The problem is that the SubReprots of the Page1 does not show in the newPage but text32 text is changed correctly and all other fields are copied succesfully.
Would you have any tips for resolving this?
Thank you!