PC Review


Reply
Thread Tools Rate Thread

Completely Blank Report...no title, data, etc.

 
 
Ann
Guest
Posts: n/a
 
      10th May 2010
I am using Access 2002. I have created five reports that list totals in the
footer of each for January through December. They are then all on a report
so there is only one report instead of five. They are not linked to each
other.

All of them show up except one. One of the reports shows nothing at all,
not even the title of the report just a huge blank area where the report
should be. I'm assuming this is because there isn't any data pulled when the
query runs. If I run the report by itself I receive rows of #Errors where
all the calculations are but nothing but blank space when it's run with all
the reports combined.

Here is the calculation for January, =Sum(IIf([txtMachineType]="SeCap" And
[txtDRSMonth]="01",[sngQuantity],"0")). I thought I would get the "0" but
didn't. I then added Nz infront of Sum hoping that would work but it didn't.
I still just get a hugh blank space where this report is listed. I need to
show that each month has a zero even if there isn't any data. Any help would
be greatly appreciated. Thanks in advance.
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      10th May 2010
If the subreport doesn't return any records then it will not display in the
main report.

In a report/group header/footer you often need to use IIf([HasData],...) to
get around errors where there are no records in the report/group.

--
Duane Hookom
Microsoft Access MVP


"Ann" wrote:

> I am using Access 2002. I have created five reports that list totals in the
> footer of each for January through December. They are then all on a report
> so there is only one report instead of five. They are not linked to each
> other.
>
> All of them show up except one. One of the reports shows nothing at all,
> not even the title of the report just a huge blank area where the report
> should be. I'm assuming this is because there isn't any data pulled when the
> query runs. If I run the report by itself I receive rows of #Errors where
> all the calculations are but nothing but blank space when it's run with all
> the reports combined.
>
> Here is the calculation for January, =Sum(IIf([txtMachineType]="SeCap" And
> [txtDRSMonth]="01",[sngQuantity],"0")). I thought I would get the "0" but
> didn't. I then added Nz infront of Sum hoping that would work but it didn't.
> I still just get a hugh blank space where this report is listed. I need to
> show that each month has a zero even if there isn't any data. Any help would
> be greatly appreciated. Thanks in advance.

 
Reply With Quote
 
Ann
Guest
Posts: n/a
 
      10th May 2010
I'm not familiar with that. Does it somehow have to be part of the following:

=Sum(IIf([txtMachineType]="SeCap" And
[txtDRSMonth]="01",[sngQuantity],"0")).

I have twelve of these statements, one for every month.

"Duane Hookom" wrote:

> If the subreport doesn't return any records then it will not display in the
> main report.
>
> In a report/group header/footer you often need to use IIf([HasData],...) to
> get around errors where there are no records in the report/group.
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "Ann" wrote:
>
> > I am using Access 2002. I have created five reports that list totals in the
> > footer of each for January through December. They are then all on a report
> > so there is only one report instead of five. They are not linked to each
> > other.
> >
> > All of them show up except one. One of the reports shows nothing at all,
> > not even the title of the report just a huge blank area where the report
> > should be. I'm assuming this is because there isn't any data pulled when the
> > query runs. If I run the report by itself I receive rows of #Errors where
> > all the calculations are but nothing but blank space when it's run with all
> > the reports combined.
> >
> > Here is the calculation for January, =Sum(IIf([txtMachineType]="SeCap" And
> > [txtDRSMonth]="01",[sngQuantity],"0")). I thought I would get the "0" but
> > didn't. I then added Nz infront of Sum hoping that would work but it didn't.
> > I still just get a hugh blank space where this report is listed. I need to
> > show that each month has a zero even if there isn't any data. Any help would
> > be greatly appreciated. Thanks in advance.

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      10th May 2010
I'm not sure if your expression is in the main or subreport or if you expect
it to display even if there are no records.

First, I would change the "0" to just 0 without the quotes. An IIf() should
not be designed to return either a number or text... pick one.
=Sum(IIf([txtMachineType]="SeCap" And [txtDRSMonth]="01",[sngQuantity],0))

Then I would suggest a small change:
=Sum(Abs([txtMachineType]="SeCap" And [txtDRSMonth]="01") * [sngQuantity])

This will return an error in a group header or footer if there are no
records. The usual solution is to use syntax like:
=IIf(HasData, Sum(Abs([txtMachineType]="SeCap" And [txtDRSMonth]="01") *
[sngQuantity]),0)

--
Duane Hookom
Microsoft Access MVP


"Ann" wrote:

> I'm not familiar with that. Does it somehow have to be part of the following:
>
> =Sum(IIf([txtMachineType]="SeCap" And
> [txtDRSMonth]="01",[sngQuantity],"0")).
>
> I have twelve of these statements, one for every month.
>
> "Duane Hookom" wrote:
>
> > If the subreport doesn't return any records then it will not display in the
> > main report.
> >
> > In a report/group header/footer you often need to use IIf([HasData],...) to
> > get around errors where there are no records in the report/group.
> >
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "Ann" wrote:
> >
> > > I am using Access 2002. I have created five reports that list totals in the
> > > footer of each for January through December. They are then all on a report
> > > so there is only one report instead of five. They are not linked to each
> > > other.
> > >
> > > All of them show up except one. One of the reports shows nothing at all,
> > > not even the title of the report just a huge blank area where the report
> > > should be. I'm assuming this is because there isn't any data pulled when the
> > > query runs. If I run the report by itself I receive rows of #Errors where
> > > all the calculations are but nothing but blank space when it's run with all
> > > the reports combined.
> > >
> > > Here is the calculation for January, =Sum(IIf([txtMachineType]="SeCap" And
> > > [txtDRSMonth]="01",[sngQuantity],"0")). I thought I would get the "0" but
> > > didn't. I then added Nz infront of Sum hoping that would work but it didn't.
> > > I still just get a hugh blank space where this report is listed. I need to
> > > show that each month has a zero even if there isn't any data. Any help would
> > > be greatly appreciated. Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: extracting data from table for title of report Duane Hookom Microsoft Access Reports 1 11th Jun 2009 01:56 AM
Set PDF Doc Title property from report data Michele Microsoft Access Reports 1 5th Jun 2006 03:54 AM
Set PDF Doc Title property from report data Michele Microsoft Access Form Coding 1 5th Jun 2006 03:54 AM
RE: completely fail to load data using crystal report Comfort Microsoft ASP .NET 1 5th Nov 2004 02:18 PM
Every other page of report is completely blank =?Utf-8?B?RGF2aWQ=?= Microsoft Access Reports 2 2nd Jun 2004 12:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:09 PM.