Solved

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

Posted on 2013-05-14
2
1,099 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Input box criteria 3 20
Autocomplete textbox in MS Access 2016 4 23
Search field on a form 7 17
Error in SQL Query 36 39
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now