日期:2014-05-18  浏览次数:20972 次

在线急等解决方法,关于打印报表的错
报表在打印的时候总是会出现这种错误导致程序无法运行。那位高手帮帮忙看看
C# code

Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report '' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Text.StringBuilder.set_Length(Int32 value)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.XsdValidatingReader.GetStringValue()
   at System.Xml.Schema.XmlSchemaValidator.ValidateText(String elementStringValue, XmlValueGetter elementValueGetter)
   at System.Xml.Schema.XmlSchemaValidator.ValidateText(XmlValueGetter elementValue)
   at System.Xml.XsdValidatingReader.ProcessReaderEvent()
   at System.Xml.XsdValidatingReader.Read()
   at Microsoft.ReportingServices.ReportPublishing.RmlValidatingReader.Read()
   at System.Xml.XmlReader.ReadString()
   at Microsoft.ReportingServices.ReportPublishing.RmlValidatingReader.ReadString()
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.ReadEmbeddedImage(Dictionary`2 embeddedImages, CLSUniqueNameValidator embeddedImageNames, PublishingContext context)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.ReadEmbeddedImages(PublishingContext context)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.ReadReport(ResolveTemporaryDataSource resolveTemporaryDataSourceCallback, DataSourceInfoCollection originalDataSources, IDataProtection dataProtection)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase1(ICatalogItemContext reportContext, Byte[] definition, IChunkFactory createChunkCallback, CheckSharedDataSource checkDataSourceCallback, ResolveTemporaryDataSource resolveTemporaryDataSourceCallback, DataSourceInfoCollection originalDataSources, IDataProtection dataProtection, String& description, String& language, DataSourceInfoCollection& dataSources, Boolean& hasExternalImages, Boolean& hasHyperlinks)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateIntermediateFormat(ICatalogItemContext reportContext, Byte[] definition, IChunkFactory createChunkCallback, CheckSharedDataSource checkDataSourceCallback, ResolveTemporaryDataSource resolveTemporaryDataSourceCallback, DataSourceInfoCollection originalDataSources, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, IDataProtection dataProtection, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(ICatalogItemContext reportContext, Byte[] reportDefinition, IChunkFactory createChunkCallback, CheckSharedDataSource checkDataSourceCallback, ResolveTemporaryDataSource resolveTemporaryDataSourceCallback, DataSourceInfoCollection originalDataSources, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, IDataProtection dataProtection, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFor