Issue with word "Parent" ... compile error (already contains a definition)

Stimulsoft Reports.NET discussion
Post Reply
mathat1970
Posts: 6
Joined: Wed Jan 05, 2011 5:05 pm

Issue with word "Parent" ... compile error (already contains a definition)

Post by mathat1970 »

I am receiving an error message when previewing an empty report that has a XML data source and need to know how to resolve it without changing the XML. To me it looks like a bug in Stimulsoft ...

Can anyone help me and if it is a bug can Stimulsoft please correct it.

Error Message:

1.Error! The error of compilation
The error of compilatin is found in the 'Report' report:
The type 'Reports.Report' already contains a definition for 'ParentEntity'

Top part of the code after clicking Code button on message:

Code: Select all

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
    public class Report : Stimulsoft.Report.StiReport
    {
        public Report()
        {
            this.InitializeComponent();
        }

        #region StiReport Designer generated code - do not modify
        public Stimulsoft.Report.Dictionary.StiDataRelation ParentEntity;
        public Stimulsoft.Report.Dictionary.StiDataRelation ParentERP_Debtor;
        public Stimulsoft.Report.Dictionary.StiDataRelation ParentESA;
        public Stimulsoft.Report.Components.StiPage Page1;
        public Stimulsoft.Report.Components.StiWatermark Page1_Watermark;
        public Stimulsoft.Report.Print.StiPrinterSettings Report_PrinterSettings;
        public ESADataSource ESA;
        public ERP_DebtorDataSource ERP_Debtor;
        public ParentEntityDataSource ParentEntity;
        public ImageDataSource Image;
Note that in the above code "ParentEntity" appears both as a Stimulsoft.Report.Dictionary.StiDataRelation and a ParentEntityDataSource.


XML Datasource:

Code: Select all

 
  
    
      
        
          
             
          
        
      
    
  
What it looks like is when the code is generated from the designer the word "Parent" is used as a prefix on all of the StiDataRelation s except where I have an element in my XML datasource called ParentEntity ...... maybe there is a bug where "Parent" is used in an Element that has a relationship ???

Note that I have nothing in my report and have simplified the XML but the issue also exists when I do have a full report and a schema.

All I have done is to open up the report designer, Create a new connection to the XML datasource, synchronised the datasource and clicked on the Preview tab.

thanks
Attachments
770.sample.mrt
(6.24 KiB) Downloaded 245 times
769.sample.xsd
(1.6 KiB) Downloaded 270 times
768.sample.xml
(260 Bytes) Downloaded 386 times
767.ErrorMessage.gif
767.ErrorMessage.gif (59.58 KiB) Viewed 1470 times
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Issue with word "Parent" ... compile error (already contains a definition)

Post by Ivan »

Hello,

We are working on this issue.

As a workaround, please rename the ParentEntity relation to the ParentEntity1.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Issue with word "Parent" ... compile error (already contains a definition)

Post by Jan »

Hello,

Problem fixed. Patch will be available in next prerelease build. Also you can change Name of relations which have problems.

Thank you.
Post Reply