Subreport with zero matches schould write certain text

  • Thread starter Thread starter Octavee Uhl
  • Start date Start date
O

Octavee Uhl

I have following problem:
I have a report with 10 possible categories.
For example 'letter', 'email', 'phone' etc.
Now I want a monthly report gruped by category. No problem
so far.
But when there is no 'email' for example, I want the
report say, "E Mail -- No entry"

What is the best way to achive that?
 
Hi Octavee,

Guessing that your Report is based on a query that has the record results
of:

Category field1
------------- -------------
letter xxx
letter xxx
letter xxx
phone yyy
phone yyy

where there is no value for "email"

It would be good if you have a LookUp table similar to the following

CategoryType
-----------------
letter
phone
email
etc..

Then include in your query the above LookUp table Left Joining your
original table. Example:

SELECT CategoryTable.CategoryType, OriginalTable.field1
FROM CategoryTable LEFT JOIN OriginalTable ON CategoryTable.CategoryType =
OriginalTable.Category;

Now your Report will have for "Email" category no values.

Then you could use various methods to get "E Mail -- No entry". Example:

=IIf(Count([field1])=0,"E Mail -- No entry",Count([field1]))


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights


--------------------
| Content-Class: urn:content-classes:message
| From: "Octavee Uhl" <[email protected]>
| Sender: "Octavee Uhl" <[email protected]>
| Subject: Subreport with zero matches schould write certain text
| Date: Wed, 28 Apr 2004 14:41:33 -0700
| Lines: 9
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcQtaZMAiW5t/d9YQXm3G4oQhp5GIQ==
| Newsgroups: microsoft.public.access.reports
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.reports:136938
| NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
| X-Tomcat-NG: microsoft.public.access.reports
|
| I have following problem:
| I have a report with 10 possible categories.
| For example 'letter', 'email', 'phone' etc.
| Now I want a monthly report gruped by category. No problem
| so far.
| But when there is no 'email' for example, I want the
| report say, "E Mail -- No entry"
|
| What is the best way to achive that?
|
 
Back
Top