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!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.