Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 10th, 2006, 06:35 PM
Robert
Guest
 
Posts: n/a
Default subreport wont show up

Arggg... I have a report that calls up numbers from two subreports. One
deals with project labor the other expenses. on each subreport, there is a
calc fields that sums cost and price. the main report then references those
fields to do more calculations. I.e. add LaborCost from labor subreport and
ExpensesCost from expenses subreport. There are a number of these
calculations and they work as expected except when one of the subreports has
no data, i.e. there were no expenses. I have a form that displays this
information and I got around the #error that access kept giving me by using
an Iif statement to count the records first and enter 0 if the count was 0.
This works on the form but not the report. So, on my report if one of the
subreports does not have any records, the subreport does not get displayed
thus #error! any thoughts?


  #2  
Old October 11th, 2006, 06:55 PM
Robert
Guest
 
Posts: n/a
Default Re: subreport wont show up

Bump...

"Robert" <none@none.comwrote in message
news:L3RWg.64246$WA2.3456@fe06.news.easynews.com.. .
Quote:
Arggg... I have a report that calls up numbers from two subreports. One
deals with project labor the other expenses. on each subreport, there is a
calc fields that sums cost and price. the main report then references
those fields to do more calculations. I.e. add LaborCost from labor
subreport and ExpensesCost from expenses subreport. There are a number of
these calculations and they work as expected except when one of the
subreports has no data, i.e. there were no expenses. I have a form that
displays this information and I got around the #error that access kept
giving me by using an Iif statement to count the records first and enter 0
if the count was 0. This works on the form but not the report. So, on my
report if one of the subreports does not have any records, the subreport
does not get displayed thus #error! any thoughts?
>

  #3  
Old October 11th, 2006, 07:15 PM
Robert
Guest
 
Posts: n/a
Default Re: subreport wont show up

Nevermind - the answer is... IIF(IsError(....

"Robert" <none@none.comwrote in message
news:YvaXg.79338$N72.12193@fe12.news.easynews.com. ..
Quote:
Bump...
>
"Robert" <none@none.comwrote in message
news:L3RWg.64246$WA2.3456@fe06.news.easynews.com.. .
Quote:
>Arggg... I have a report that calls up numbers from two subreports. One
>deals with project labor the other expenses. on each subreport, there is
>a calc fields that sums cost and price. the main report then references
>those fields to do more calculations. I.e. add LaborCost from labor
>subreport and ExpensesCost from expenses subreport. There are a number of
>these calculations and they work as expected except when one of the
>subreports has no data, i.e. there were no expenses. I have a form that
>displays this information and I got around the #error that access kept
>giving me by using an Iif statement to count the records first and enter
>0 if the count was 0. This works on the form but not the report. So, on
>my report if one of the subreports does not have any records, the
>subreport does not get displayed thus #error! any thoughts?
>>
>
>

  #4  
Old October 11th, 2006, 08:05 PM
deluxeinformation@gmail.com
Guest
 
Posts: n/a
Default Re: subreport wont show up


Robert wrote:
Quote:
Arggg... I have a report that calls up numbers from two subreports. One
deals with project labor the other expenses. on each subreport, there is a
calc fields that sums cost and price. the main report then references those
fields to do more calculations. I.e. add LaborCost from labor subreport and
ExpensesCost from expenses subreport. There are a number of these
calculations and they work as expected except when one of the subreports has
no data, i.e. there were no expenses. I have a form that displays this
information and I got around the #error that access kept giving me by using
an Iif statement to count the records first and enter 0 if the count was 0.
This works on the form but not the report. So, on my report if one of the
subreports does not have any records, the subreport does not get displayed
thus #error! any thoughts?
Have you thought about using the HasData property of the report to
determine if it has any data or not, e.g.

if mysubreport.report.HasData then
' use the field on the subreport
else
' use 0
end if

Bruce

  #5  
Old October 11th, 2006, 08:15 PM
Robert
Guest
 
Posts: n/a
Default Re: subreport wont show up

Nope, I didn't know about that, however, I found another work around using
IsError to convert those boxes to 0.

<deluxeinformation@gmail.comwrote in message
news:1160594125.896458.227230@c28g2000cwb.googlegr oups.com...
Quote:
>
Have you thought about using the HasData property of the report to
determine if it has any data or not, e.g.
>
if mysubreport.report.HasData then
' use the field on the subreport
else
' use 0
end if
>
Bruce
>

  #6  
Old October 12th, 2006, 11:55 AM
Vayse
Guest
 
Posts: n/a
Default Re: subreport wont show up

I use IsNumeric function is such cases. On the sub report, there could a box
called txtCountLabour
On the main form, I would have something like
=IIF(IsNumeric(Reports!rptLabour!txtCountLabour),
Reports!rptLabour!txtCountLabour,0)

If there is no data in the sub report, a 0 will be displayed instead.

HTH
Vayse

"Robert" <none@none.comwrote in message
news:L3RWg.64246$WA2.3456@fe06.news.easynews.com.. .
Quote:
Arggg... I have a report that calls up numbers from two subreports. One
deals with project labor the other expenses. on each subreport, there is a
calc fields that sums cost and price. the main report then references
those fields to do more calculations. I.e. add LaborCost from labor
subreport and ExpensesCost from expenses subreport. There are a number of
these calculations and they work as expected except when one of the
subreports has no data, i.e. there were no expenses. I have a form that
displays this information and I got around the #error that access kept
giving me by using an Iif statement to count the records first and enter 0
if the count was 0. This works on the form but not the report. So, on my
report if one of the subreports does not have any records, the subreport
does not get displayed thus #error! any thoughts?
>

 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles