Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi I have a grid , and have marked its exporting settings to PDF,word,excel and csv,
on exporting to PDF it gives the following exception:
C#
System.Xml.XmlException: The '{' character, hexadecimal value 0x7B, cannot be included in a name.


the code done is:
C#
<ExportSettings>
                          <Pdf PageHeight="210mm" PageWidth="350mm" PageTitle="Child Suppliers" DefaultFontFamily="Arial Unicode MS"
                              PageBottomMargin="20mm" PageTopMargin="20mm" PageLeftMargin="20mm" PageRightMargin="20mm" />
                      </ExportSettings>

.cs file includes:
C#
protected void grdPlan_ItemCommand(object sender, GridCommandEventArgs e)
       {
           try
           {
               base.InsertOrEdit(grdPlan, e);
               if (e.CommandName.Equals(RadGrid.ExportToExcelCommandName) ||
                  e.CommandName.Equals(RadGrid.ExportToCsvCommandName) ||
                  e.CommandName.Equals(RadGrid.ExportToPdfCommandName) ||
                  e.CommandName.Equals(RadGrid.ExportToWordCommandName))
               {
                   base.ConfigureExport(grdPlan);
               }
           }
           catch (SysXException ex)
           {
               SysXWebSiteUtils.LoggerService.GetLogger().Error(ex.Message, ex, LogModule.SupplierMaster);
               lblErrorMessage.ShowMessage(ex.Message, MessageType.Error);
           }
           catch (Exception ex)
           {
               SysXWebSiteUtils.LoggerService.GetLogger().Error(ex.Message, ex, LogModule.SupplierMaster);
               lblErrorMessage.ShowMessage(ex.Message, MessageType.Error);
           }
       }

does anyone has any idea???
Posted
Updated 6-May-13 0:56am
v2
Comments
Thanks7872 6-May-13 6:33am    
post code through which you are exporting data to pdf.(use Improve question).
pree_kh 6-May-13 6:56am    
@Rohan Leuva:hi i've posted the same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900