473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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?
Oct 10 '06 #1
5 2123
Bump...

"Robert" <no**@none.comwrote in message
news:L3******************@fe06.news.easynews.com.. .
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?

Oct 11 '06 #2
Nevermind - the answer is... IIF(IsError(....

"Robert" <no**@none.comwrote in message
news:Yv*******************@fe12.news.easynews.com. ..
Bump...

"Robert" <no**@none.comwrote in message
news:L3******************@fe06.news.easynews.com.. .
>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?


Oct 11 '06 #3

Robert wrote:
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

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

<de***************@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
>
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

Oct 11 '06 #5
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" <no**@none.comwrote in message
news:L3******************@fe06.news.easynews.com.. .
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?

Oct 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
I'm in a sad state, not knowing anyone who knows more than the little I do about Access, so I'm having to learn it all from a book. Sometimes I just can't find what I need to know. People in my...
8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
2
by: DFS | last post by:
Main report contains one large graph in the detail band (no detail records). Subreport snakes just fine (5 columns) when opening by itself. When I add it to the main report (in the report...
1
by: Ellen Manning | last post by:
The main report shows all medical conferences for a resident by year, by month. A resident can attend many of the same conferences in a year. In the year footer, I have a subreport that summarizes...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
1
by: dd_bdlm | last post by:
This seems like a very silly simple question and I am sure I am doing something very easy wrong.....but.....I cant get my subreport to display on my main report! I have tried everything I can think...
3
by: Coll | last post by:
I have a report that I run every quarter. When I opened it this quarter, one of the subreports is not displaying. No error message - just nothing displays where the subreport data should be. If you...
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
3
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.