Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1725
Xmlexception in UltraGridDocumentExporter?
posted

For some reason, starting (I think) with 8.3.20083.2059 I've started getting an xml exception when trying to export a grid.

I'm trying to identify the cause but so far I'm stumped as the code that I have to build the report has not changed and the exception appears to be down in the bowles of the export function.

2009-04-27 11:42:31,726 [10] ERROR TastingMaster.TastingEntry [(null)] - An error occurred while parsing EntityName. Line 1, position 50.
System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 50.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.Throw(String res)
   at System.Xml.XmlTextReaderImpl.ParseEntityName()
   at System.Xml.XmlTextReaderImpl.ParseEntityReference()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at Infragistics.Win.UltraWinGrid.DocumentExport.Utilities.SplitContent(String formattedText)
   at Infragistics.Win.UltraWinGrid.DocumentExport.Utilities.MeasureFormattedText(String formattedText, Single width, Font baseFont, AppearanceData& defaultAppearance, ISection section, Size& textSize)
   at Infragistics.Win.UltraWinGrid.DocumentExport.GraphicsCache.MeasureFormattedText(String text, Single cellWidth, Font baseFont, AppearanceData& appearance)
   at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.ProcessGridRowInternal(UltraGridExporterHelper ultraGridExporterHelper, UltraGridRow row, ProcessRowParams processRowParams)
   at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridExporterHelper.Infragistics.Win.UltraWinGrid.IUltraGridExporter.ProcessRow(UltraGridRow row, ProcessRowParams processRowParams)
   at Infragistics.Win.UltraWinGrid.RowsCollection.InternalTraverseRowsHelper(IUltraGridExporter exporter)
   at Infragistics.Win.UltraWinGrid.RowsCollection.InternalTraverseRowsHelper(IUltraGridExporter exporter)
   at Infragistics.Win.UltraWinGrid.RowsCollection.InternalTraverseRowsHelper(IUltraGridExporter exporter)
   at Infragistics.Win.UltraWinGrid.UltraGrid.Export(IUltraGridExporter exporter)
   at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, ISection section)
   at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, Report report)
   at TastingMaster.TastingEntry.BuildReport(UltraGrid reportGrid, String reportTitle) in D:\TastingMaster\Source\TastingMaster\TastingMaster\Framework\TastingEntry.cs:line 903
   at TastingMaster.TastingEntry.ReportExport(UltraGrid reportGrid, String fileName, FileFormat exportFormat, String reportTitle) in D:\TastingMaster\Source\TastingMaster\TastingMaster\Framework\TastingEntry.cs:line 968

Has anyone seen this error before and have a suggestion or is there a way to capture whatever xml file the text reader is trying to read to see if I can find anything out from that?

Neil

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Neil,

    If having an "&" character in your data is causing the Export method to raise an exception, then that's a bug in the exporter, you should not have to fix it in your code. Are you sure that's what is happening?

    I tested this out by placing an "&" in a string column and the grid and then exporting it and it worked just fine for me.

Reply Children