Problem after Upgrade to 10.2.16.914

4 posts, 1 answers
  1. Otto Neff
    Otto Neff avatar
    36 posts
    Member since:
    Jul 2011

    Posted 10 Oct Link to this post

    Hi,

    just used the Upgrade Wizard in VS and upgraded to 10.2.16.914 from previous release Version.

    Now the reports are broken. Maybe someone can help.

    The Textbox.Value applied Text is not rendered anymore on NeedDatasource Event, see attached screenshots.

    Kind regards.

  2. Otto Neff
    Otto Neff avatar
    36 posts
    Member since:
    Jul 2011

    Posted 10 Oct Link to this post

    After using Upgrade Wizard with Version 10.1.16.504,
    Reports, same code, working again.

    Something changed on lifecycle? 

  3. DevCraft banner
  4. Answer
    Stef
    Admin
    Stef avatar
    3050 posts

    Posted 12 Oct Link to this post

    Hi,

    An important change as of R3 2016 is that any changes of the report definition or its items in events will not be applied. In events you can access and modify only the processing elements -  Understanding events . In previous versions changes were propagated, but the result was unpredictable due to the relation to the order of processing of inner elements of the report.

    To illustrate:​
    • Invalid:
      private void textBox1_ItemDataBinding(object sender, EventArgs e)
      {
       //the change will not be applied
        this.textBox1.Value="test";
      }
    • Valid:
      private void textBox1_ItemDataBinding(object sender, EventArgs e)
      {
          //the change will be applied on the current processing element, not all processing elements originating from this.textBox1 definition
          Telerik.Reporting.Processing.TextBox txt = (Telerik.Reporting.Processing.TextBox)sender;
           txt.Value="test";
      }
    • Recommended:
      //code from the report's designer.cs file
      this.textBox1.Value="=MyFunction(Fields.X)";
       
      public static string MyFunction(int paramX)
      {
          return String.Format("{0} position", paramX);
      }

    Let us know if you need further help.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Otto Neff
    Otto Neff avatar
    36 posts
    Member since:
    Jul 2011

    Posted 13 Oct Link to this post

    This helps a lot! Thanks for the pretty clear answer.

     

Back to Top