Ticket T472737
Visible to All Users

Report Designer not working

created 8 years ago

Hi,

This week in my team we've been working in a couple of reports, in fact yesterday we finished the design with the report designer and today early morning we turned the computer on and started the visual studio 2015 and we can't open the design of the reports. Surprised about it I tried it into another computers and I have the same problem. I attach a screenshot about the error. I've been looking for the problem in the forum but I don't find a possible solution.

Thank you!

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hi,

In the end I found the problem but I don't understand the theory to make the designer crash I have the following class which inherits from the DevExpress.XtraReports.UI.XtraReport and there's a variable definition of GesAlbComReportModel model this is the cause of my problem if I comment this variable it works! I found how to solve it passing the values of that object to primitive variables type of c#.

C#
public partial class GesAlbComReport : DevExpress.XtraReports.UI.XtraReport { GesAlbComReportModel model; bool PrintIrpf = false; bool PrintRec = false; public GesAlbComReport(GesAlbComReportModel model) { this.model = model; if (model.GesAlbCom.DivIrpf.NumeroDecimal != 0) { PrintIrpf = true; } if (PrintIrpf==false && model.GesAlbCom.DivSumaRecarrec.NumeroDecimal!=0) PrintRec = true; InitializeComponent(); } .... .... ....

Thank you!

    Comments (3)
    DevExpress Support Team 8 years ago

      Hello Pere,
      Thank you for the update. The designer requires a parameterless constructor defined for a report.

      You can have a default parameterless constructor and add a custom one accepting some parameters.

      >>> I found how to solve it passing the values of that object to primitive variables type of c#.
      You can create public properties to pass some values to a report. Please also take note of report parameters.

      Feel free to contact us in case of further questions.

      P P
      Pere Pujol Espuña 8 years ago

        Hi Jannet,

        Even I have a parameterless constructor the report designer crashes at design time. If I just remove the "GesAlbComReportModel model" variable declaration it works.

        C#
        public partial class GesAlbComReport : DevExpress.XtraReports.UI.XtraReport { GesAlbComReportModel model; bool PrintIrpf = false; bool PrintRec = false; public GesAlbComReport() { InitializeComponent(); } public GesAlbComReport(GesAlbComReportModel model) { this.model = model; if (model.GesAlbCom.DivIrpf.NumeroDecimal != 0) { PrintIrpf = true; } if (PrintIrpf == false && model.GesAlbCom.DivSumaRecarrec.NumeroDecimal != 0) PrintRec = true; InitializeComponent(); }

        Thank you!

        DevExpress Support Team 8 years ago

          Thank you for your input, Pere. Feel free to contact us in case of further difficulties.

          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.