CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    163

    Page Header Suppression

    Hello everybody,

    Here is my problem. I'm generating a sub report in the report footer of the main report.

    My problem is the page header for main report is displaying in the sub report.

    I like to suppress the page header when the sub report is displaying.

    Is there any way to do this?

    Thanks in advance

  2. #2
    Join Date
    Sep 2004
    Posts
    1

    Smile Re: Page Header Suppression

    Hello there,

    Since I had the same problem regarding your question. I've searched the web for some possible answers, i hope this will help you because it works in my report

    Here's how to do it:
    1. In your main report right click on the Page Header Section then click Format Section

    2. Click on the Page Header, check Supress (no drill down) then click x-2 button

    3. Finally paste this formula

    WhilePrintingRecords;
    Global NumberVar gh1;
    Global NumberVar permanentgh1;
    Global booleanVar Suppress;

    If pagenumber = 1 then
    permanentgh1 := gh1;

    permanentgh1 = 1;

    if gh1=0 then

    Suppress:=True

    I hope this will work in your report. have a good day.
    Last edited by llednew1827; September 8th, 2004 at 05:14 AM. Reason: Find some ways to do it

  3. #3
    Join Date
    May 2003
    Posts
    163

    Re: Page Header Suppression

    I resolved the problem by checking a run time value which is set when the lastrecord is read.

    i.e suppressing the page header when the cournter is set (i.e when the last record in the main report is read/print)

    Hope yours also will work.

    Anyway thank u so much.

  4. #4
    Join Date
    Apr 2005
    Posts
    1

    Re: Page Header Suppression

    harmonycitra/IIednew1827

    I am kind of novice in programming vb code. Can you please post the code whatever you developed to suppress the page heading in the subreport.

    When I used the existing code on this page It suppressed totally, that means not only on subreport pages, but on main report. I want Header on main report.

    Thanks in Advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured