| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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; Code:
Numbervar c; whileprintingrecords; c:=c+1; 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. |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|