1758291 - Extra line spacing gets added to the text when a Crystal report is exported to HTML 40 using .NET SDK.

SAP Knowledge Base Article - Public

1758291 - Extra line spacing gets added to the text when a Crystal report is exported to HTML 40 using .NET SDK.

Symptom

 Extra line spacing gets added to the text when a Crystal report is exported to HTML 40 using .NET SDK.

Environment

  • Visual Studio 2010
  • Crystal Reports 2010 SP4

Reproducing the Issue

1. Develop a sample application using below code to export a Crystal report to HTML 40.

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Web;
using CrystalDecisions.Shared;
public partial class _Default : System.Web.UI.Page
{
    private DiskFileDestinationOptions diskFileDestinationOptions;
    private ExportOptions exportOptions;
        protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument rd = new ReportDocument() ;
 rd.Load(Server.MapPath("Report1.rpt"));
          if (!System.IO.Directory.Exists(exportPath))
        {
 System.IO.Directory.CreateDirectory(exportPath);
        }
        diskFileDestinationOptions = new DiskFileDestinationOptions();
        exportOptions = rd.ExportOptions;
        exportOptions.ExportDestinationType =
ExportDestinationType.DiskFile;
        exportOptions.FormatOptions = null;
        exportOptions.ExportFormatType = ExportFormatType.HTML40;
        HTMLFormatOptions html40FormatOptions = new HTMLFormatOptions();
 html40FormatOptions.HTMLBaseFolderName = @"c:\test\html12\";
        html40FormatOptions.HTMLFileName = @"c:\test\html12\Reprot1" ;
        html40FormatOptions.HTMLEnableSeparatedPages = true;
 html40FormatOptions.HTMLHasPageNavigator = true;
        html40FormatOptions.FirstPageNumber = 1;
 html40FormatOptions.LastPageNumber = 3;
        exportOptions.FormatOptions = html40FormatOptions;
        rd.Export();
 }
}
 

2. Observe the line spacing in the text.

3. Issue could not be reproduced using SP3, export to HTML 40 works fine with SP3 for Crystal Reports for Visual Studio 2010.

Resolution

Issue is resolved in SP5 for Crystal Reports for Visual Studio 2010.

Download Link: http://scn.sap.com/docs/DOC-7824

Keywords

KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Bug Filed

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio