SAP Knowledge Base Article - Public

1566720 - CRVS2010 error; Buffer too small for string or missing null byte

Symptom

  • Using ReportDocument.SaveAs(vPath, false)
  • Reports that contain more than 512 characters in the report comments area throw the error:

Buffer too small for string or missing null byte.
      at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.SaveAs in :line 0
      at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.SaveAs in :line 0
      at CrystalDecisions.CrystalReports.Engine.ReportDocument.SaveAs in :line 0

Environment

Reproducing the Issue

  • Create a report and populate the Report Comments section with more than 512 characters
  • Crystal Reports 2008 truncated the comments at 512 characters, but did not cause an exception

Resolution

  • Technical Escalation has been created
  • ADAPT01522350, scheduled to be resolved in Service Pack 3
  • ETA; mid 2012

Keywords

CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio