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

Posted on 2006-04-26
Last Modified: 2008-03-04
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
Question by:Mirsent
    LVL 42

    Accepted Solution

    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.

    Author Comment

    Thanks, that's a great suggestion. I've tried it and it works perfectly.
    LVL 42

    Expert Comment

    Glad to help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now