CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old April 2nd, 2005, 02:26 AM
    smileyim smileyim is offline
    Junior Member
     
    Join Date: Apr 2005
    Posts: 1
    smileyim is an unknown quantity at this point (<10)
    How to suppress the group header session when no record return?

    How to suppress the group header session if there is no record return in detail session?

    Regards
    Reply With Quote
      #2    
    Old April 4th, 2005, 12:33 AM
    Madhi Madhi is offline
    Senior Member
     
    Join Date: Jul 2004
    Location: Chennai, India
    Posts: 1,064
    Madhi will become famous soon enough (50+)
    Re: How to suppress the group header session when no record return?

    Create tow formulae
    Formula1 @Reset having the code
    Code:
    Numbervar c;
    whileprintingrecords;
    c:=0;
    Formula2 @Count having the code
    Code:
    Numbervar c;
    whileprintingrecords;
    c:=c+1;
    Place Formul1 at PageHeader and Formula2 at Details.
    In the section expert of Group header write this code at suppress option
    Code:
    numbervar c;
    if c:=0 then true
    __________________
    Madhivanan

    Failing to plan is Planning to fail

    Last edited by Madhi; April 4th, 2005 at 12:36 AM.
    Reply With Quote
      #3    
    Old July 13th, 2006, 10:15 AM
    thomas79 thomas79 is offline
    Junior Member
     
    Join Date: Jul 2006
    Posts: 1
    thomas79 is an unknown quantity at this point (<10)
    Re: How to suppress the group header session when no record return?

    Hi

    The above solution didn't work for me. However, I think the following should work:

    1) Create an additional section above the already existing section(s) in the details.

    2) Move the contents of the group header to the newly created section in the details.

    3) Suppress the group header.

    4) Create a global variable, say @isFirstRecordInGroup, which you set to true in the group header.

    5) Suppress the newly added section in details (which now contains the previous contents of the group header) if @isFirstRecordInGroup is false. Otherwise, if @isFirstRecordInGroup is true, don't suppress and set @isFirstRecordInGroup to false.

    In this way, the contents that were previously placed in the group header will now be shown as part of the first detail in each group. Hence, if there are no details, nothing will be displayed.

    Admittedly, this hack does not render the report more understandable for other programmers, but it should fix the problem.

    Last edited by thomas79; July 13th, 2006 at 10:27 AM.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:50 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009