Only display page header if Detail session has data

G

Guest

Hi,
I have some column titles on page header and summary session on Report
Footer. It is nice for the middle pages which have data on Detail session and
column titile on the top of the pages. But on the last page, there may no
data on Detail session, only my summary information, but the page header
still be displayed.

How to hide page header if Detail Session has no data ?

Thanks for help

Tran Hong Quang
 
M

Marshall Barton

Tran said:
I have some column titles on page header and summary session on Report
Footer. It is nice for the middle pages which have data on Detail session and
column titile on the top of the pages. But on the last page, there may no
data on Detail session, only my summary information, but the page header
still be displayed.


Add a hidden text box named txtLineCnt to the detail
section. Set its control source expression to =1 and
RunningSum property to Over All.

Now, add another hidden text box named txtTotalCnt to the
report header section and set its control source expression
to =Count(*)

Now add a line of code to the detail section's Format event
procedureL
Me.Section(3).Visible = (Me.txtLineCnt < Me.txtTotalCnt)
 
G

Guest

Thank Marshall for your help.

But I have problem with Page Header, not Report Header. Putting an counter
on Page Header will create error (txtTotalCnt with ControlSource=Count(*)
will raise error).

Regards
Tran Hong Quang
 
M

Marshall Barton

There is no problem with the Report Header. If you don't
have that section, add it and make it invisible.
 
G

Guest

Hi,
I have report displaying User data and grouped by User, new User will start
on new page. One User data may occupy some pages, so that I put Column Title
on Page Header. The problem that for the first page of given User, there is
already User header session, I don't want to display Page Header.

Put a counter on Report Header doesn't help in this case. Report Header
counter always show the total row, so that it is always greather than counter
on Detail session dispite that is the first page of user or not.

Thanks
Quang

Marshall Barton said:
There is no problem with the Report Header. If you don't
have that section, add it and make it invisible.
--
Marsh
MVP [MS Access]

But I have problem with Page Header, not Report Header. Putting an counter
on Page Header will create error (txtTotalCnt with ControlSource=Count(*)
will raise error).
 
M

Marshall Barton

Is this a new question or have I completely misunderstood
the question you originally asked?

If it is a new question, did you get the original problem
taken care of?

For this question, you might want to try removing the page
header and setting the group header section's RepeatSection
property to Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top