Ticket T826699
Visible to All Users

Reports - Why the "Rules have already been set" error occurs

created 5 years ago (modified 5 years ago)

[DevExpress Support Team: CLONED FROM T308208: How to fix the 'Data at the root level is invalid. Line 1, position 1.' exception after setting the ReportsModuleV2.ReportStoreMode property to XML]

Trying to convert my existing ReportsV2 reports in 19.1.6 update to the XML format.  I'm getting a "Rules have already been set" error.

When I look at the watch window, I see the rules, but can't figure out how to remove or change them.

Answers approved by DevExpress Support

created 5 years ago (modified 5 years ago)

Hi Randy,

It looks like you call the DevExpress.Security.Resources.AccessSettings.ReportingSpecificResources.SetRules method several times. I suggest you check this. For example, if you have a WinForms application, you may call it in the Program.cs file. In the case of a Web application - in Global.asax.

    Show previous comments (3)
    DevExpress Support Team 5 years ago

      Thank you for your project, Randy. Indeed, in an XAF Web application, there is a call of the DevExpress.XtraReports.Web.Native.ClientControls.ClientControlCommonBootstrapper.UseDefaultSecuritySettings method that sets these rules. I suggest you move your call of the DevExpress.Security.Resources.AccessSettings.ReportingSpecificResources.SetRules method to the Application_Start method of Global.asax. This call is required only once. Remove it after you upgrade your reports.

        Thanks!  That worked.

        DevExpress Support Team 5 years ago

          You are welcome, Randy!

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.