473,385 Members | 1,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Keeping empty subreport visible

Hi All,
I have a report which has several sub-reports on it, Each sub-report
has its own record source and child/parent link.
Sometimes a sub-report may not have data for an entered policy nbr and
on the report thier is just an empty space where that sub-report would
be when that happens.

How do I get the sub-report to still display on the report when it has
no data????

I've tried putting code in the 'No Data' event of the sub-report but
that does not even get kicked-off when the underlining query has no
data.
thanks
bobh.

Nov 13 '05 #1
2 11695
As you found the subreport prints nothing at all if the is no data in its
RecordSource.

If you still want its column headings to show even when there is no data to
print, the simplest option it to move the heading labels out of the
subreport, and onto the main report.

You can also do stuff like this in the Control Source of a text box on the
main report:
=IIf([Sub1].[Report].[HasData], Null, "Whatever you want to say.")
where Sub1 is the name of the subreport control.

If those ideas are not enough, you have to somehow get something into the
subreport's RecordSource. Changing the subreport's RecordSource to a UNION
query that contains at least one blank record would be one approach.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"bobh" <vu******@isp.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi All,
I have a report which has several sub-reports on it, Each sub-report
has its own record source and child/parent link.
Sometimes a sub-report may not have data for an entered policy nbr and
on the report thier is just an empty space where that sub-report would
be when that happens.

How do I get the sub-report to still display on the report when it has
no data????

I've tried putting code in the 'No Data' event of the sub-report but
that does not even get kicked-off when the underlining query has no
data.
thanks
bobh

Nov 13 '05 #2
Allen,
Yes, keeping the sub-report labels visible is exactly what I want to
do. Thanks for your suggestions, I'll give them a try.
bobh.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
3
by: John M | last post by:
Hi, I've set up a sytem in our school for writing reports. It uses Access ... and does a fine job! My problem comes with printing. Each subject produces a report consisting of a series of...
1
by: last Name | last post by:
Hello all, I'm using Access 2000. I have a subreport control which loads a report in the detail section of a main report. I need to keep a count of each item price in the subreport and place it...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
1
by: Jordan Fee | last post by:
I'd like to perform some conditional formatting in the OnFormat Event of my Parent Report. This works fine, until my subreports are blank, then the invalid references start happening. I understand...
3
by: kmacon | last post by:
I have a form that contains a command button. The command button's OnClick event builds a report using the CreateReport and CreateReportControl functions and then opens the main report. I set...
5
by: ken | last post by:
Hi, Why can't I do this in the report activate section of my main report? I have a main report, and a subreport on it. The idea is that if the subreport has a certain value in a control within it,...
2
by: Ron | last post by:
I have a report let's call rptOne. On rptOne I have a subreport called srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo is there and shows it's data and sometimes not,...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.