SAP Knowledge Base Article - Public

1663384 - Error: The report file name was empty - using ApplyPageMargins() method

Symptom

  • Using the Crystal Reports SDK for VS .NET
  • When setting report page mergins with the ApplyPageMargins() method an error is thrown:

The report file name was empty

Environment

  • Crystal Reports XI R2 (11.5.x)
  • VS .NET 2005
  • VS .NET 2008

Reproducing the Issue

  1. Use the code as below:
Dim margins as PageMargins
margins=crReport.PrintOptions.PageMargins
margins.LeftMargin = 1440
margins.rightMargin = 1440
margins.topMargin = 1440
margins.bottomMargin = 1440
crReport.PrintOptions.ApplyPageMargins(margins)

      2.  Run the application

      3.  The following InvalidOperationException error will occur:

The Report Name was empty

Resolution

  • The issue is resolved in Service Pack 2 for Crystal Reports 2008
  • ADAPT00691796

See Also

Where did all the Crystal Reports XI R1 and R2 fixes go?

Keywords

margin code api solution developer kit property print printer , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports XI R2