Regenerate Designer Files

0 Answers 29 Views
Conditional Formatting Upgrade
Eric
Top achievements
Rank 2
Eric asked on 13 Jan 2022, 03:39 PM

We have recently updated from v10 to v15 of Telerik Reporting via the Report Upgrade Wizard.  Everything is looking good for all of our report files but I did notice an issue with Conditional Formatting.  Conditional Formatting seemed to work intermittently across different reports.  I opened one of these reports in the VS 2019 Designer and changed the formatting and saved it and it started working as it had before.  When I compared the differences I noticed the precision of the drawing locations for the controls had been changed.  The Conditional Formatting was the same.

This is kind of a multipart question so I apologize in advance.

1. Is there a way to force the designer files to be regenerated across all of the report files in my solution?

2. Are there any know issues with Conditional Formatting that would not allow the following code to work?

//When we are not on page 1 show this panel.

formattingRule1.Filters.Add(new Telerik.Reporting.Filter("=PageNumber", Telerik.Reporting.FilterOperator.Equal, "=1"));    formattingRule1.Style.Visible = false;

Thanks,

Eric

Dimitar
Telerik team
commented on 18 Jan 2022, 11:28 AM

The reports probably need to be reserialized in order to be updated and any old code to be removed. A small change in the designer will cause it to reserialize the report definition but unfortunately, as far as I am aware there isn't a tool that could automatically do that for each report. For more information, visit Upgrading old projects to the latest Telerik Reporting version.

The provided code snippet looks correct to me, the only thing that is left is adding that formatting rule to the corresponding report item/s. For example:

  formattingRule2.Filters.Add(new Telerik.Reporting.Filter("= PageNumber", Telerik.Reporting.FilterOperator.Equal, "=1"));
  formattingRule2.Style.Visible = false;
  this.panel1.ConditionalFormatting.AddRange(new Telerik.Reporting.Drawing.FormattingRule[] {
            formattingRule2});

No answers yet. Maybe you can help?

Tags
Conditional Formatting Upgrade
Asked by
Eric
Top achievements
Rank 2
Share this question
or