• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

Turn off "Export Page Header and Page Footer" via RDC when exporting to Excel

When exporting to Excel via the Report Viewer there is an option "Export Page Header and Page Footer". I want to set this option programatically using the ExportOptions object in the Report Designer Component but there does not seem to be a way to do this. Is there a way to do this?

The reason I want to do this leads me to the real problem. I have a copyright watermark on my report which is implemented in tall Page Header with the Underlay Following Sections option set. This works perfectly in Crystal Viewer but when I export to Excel the copyright image appears on every page and messes up the report. If I can choose not to export the Page Header that solves the problem. If it's not possible to suppress printing of the Page Header is there another way to have a watermark that does't cause this problem?

I'm using Crystal Reports version 9.

Thanks in advance
Miriam
0
Mirsent
Asked:
Mirsent
  • 2
1 Solution
 
frodomanCommented:
I'm not aware of any direct way to do this.  AFAIK there isn't a way to set this in code and the way you're doing the watermark is the only feasible way I know of.

The only alternative I can think of would be to use a parameter in your report to conditionally suppress the page header section containing the watermark.  You could have your code pass a parameter value that will cause the section containing the watermark to be supressed before doing the export.
0
 
MirsentAuthor Commented:
Thanks, that's a great suggestion. I've tried it and it works perfectly.
0
 
frodomanCommented:
Glad to help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now