?
Solved

Can't get blank record sub-reports to show in Access 2010

Posted on 2013-05-14
2
Medium Priority
?
1,241 Views
Last Modified: 2013-05-14
I have a main report that is a container which holds sub reports run by separate queries.

If a sub report has no records it doesn't show up in print preview, only in report view and therefore exports to pdf with missing sub- reports.  The sub-reports are designed to show the message "Nil report" which is important for our auditing process.

I have gotten around this problem in other reports by creating queries which creates fake records...but statusing them and then deleting these records become a nightmare to manage and I figure there must be a better way.

I read the following solution from a similar question, but can't get it to work because I don't understand what to put where:


You can also use the subreport's .HasData property. For example, create a textbox (also with .CanShrink) with this expression:

    = IIf(subObject.Report.HasData,Null,'No Data!')

This will show the message instead of the empty report.

Any help on the above or a different solution would be appreciated.
0
Comment
Question by:grmcra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39165903
try changing this

  = IIf(subObject.Report.HasData,Null,'No Data!')


with


  = IIf(Report![NameofsubReportControl].Report.HasData,Null,'No Data!')




NameofsubReportControl is the name of the control holding the subreport.
0
 

Author Closing Comment

by:grmcra
ID: 39165951
Awesome, thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question