473,320 Members | 1,961 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,320 software developers and data experts.

Totalling subreports in main report?

I have a report concerning a customer.
In this report we find four subreports. They are in layout identical
but data comes from different tabel.
Now on the main report I count the totals of each report and sum them;

=[rptGBBGroepsIDJaaroverzicht1].[Report]![Tekst100]+[Sub141].[Report]![Tekst100]+[Sub142].[Report]![Tekst100]

But if of of the subreports has no data for example because it has no
data I get an error...

How can I tell the totalling field that, if for example subreport 141
not exists, it should ignore the missing report?

A function like the X=nz([a])+nz([b])+nz([c])+nz([d]) but then for
reports..........

Anyone having a bright idea?

TIA, Henro

Jun 27 '06 #1
2 1996
Test the HasData property of the report in each subreport:

=IIf([rptGBBGroepsIDJaaroverzicht1].[Report].HasData,
Nz([rptGBBGroepsIDJaaroverzicht1].[Report]![Tekst100], 0), 0)
+ IIf([Sub141].[Report]![Tekst100].HasData,
Nz([Sub141].[Report]![Tekst100],0), 0)
+ ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Henrootje" <He****@gmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...
I have a report concerning a customer.
In this report we find four subreports. They are in layout identical
but data comes from different tabel.
Now on the main report I count the totals of each report and sum them;

=[rptGBBGroepsIDJaaroverzicht1].[Report]![Tekst100]+[Sub141].[Report]![Tekst100]+[Sub142].[Report]![Tekst100]

But if of of the subreports has no data for example because it has no
data I get an error...

How can I tell the totalling field that, if for example subreport 141
not exists, it should ignore the missing report?

A function like the X=nz([a])+nz([b])+nz([c])+nz([d]) but then for
reports..........

Jun 27 '06 #2
Thanks Alan!
Allen Browne schreef:
Test the HasData property of the report in each subreport:

=IIf([rptGBBGroepsIDJaaroverzicht1].[Report].HasData,
Nz([rptGBBGroepsIDJaaroverzicht1].[Report]![Tekst100], 0), 0)
+ IIf([Sub141].[Report]![Tekst100].HasData,
Nz([Sub141].[Report]![Tekst100],0), 0)
+ ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Henrootje" <He****@gmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...
I have a report concerning a customer.
In this report we find four subreports. They are in layout identical
but data comes from different tabel.
Now on the main report I count the totals of each report and sum them;

=[rptGBBGroepsIDJaaroverzicht1].[Report]![Tekst100]+[Sub141].[Report]![Tekst100]+[Sub142].[Report]![Tekst100]

But if of of the subreports has no data for example because it has no
data I get an error...

How can I tell the totalling field that, if for example subreport 141
not exists, it should ignore the missing report?

A function like the X=nz([a])+nz([b])+nz([c])+nz([d]) but then for
reports..........


Jun 27 '06 #3

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

Similar topics

1
by: Don Sealer | last post by:
I have a report that includes 5 different subreports. I'd like to be able to open this report using a date function (Start Date and End Date). I'd like all five subreports to show the data from...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
2
by: AccessAl | last post by:
:confused: I have inheritted a system with reports that were probably written by a novice access programmer. My problem is a report with a dozen subreports in them. I had to add another subreport...
1
by: David | last post by:
Folks, I have four subreports in a report in the detail section. I suppose I could move them to the footer of the report. Anyway, if any of them have data, I want the main report to force a...
3
by: DeanL | last post by:
Hi all, I'm currently pulling out my already thin hair and need a little help if possible. I have an Access 97 db that is used to store inspection information for different regions. My report...
6
by: xian2 | last post by:
Hi All, I know you have heard this all before from the millions of other people asking the same question, but I have read through many other posts and NeoPa's guide and another guide i found on...
0
by: billygotee | last post by:
Hi, I'm having an issue with VS .NET 2k5. I have a master report that is the parent of several subreports (the report got too big to keep it all in the same report). For a while this worked...
1
by: MartinaN | last post by:
Hello, I have a MS Access 2000 question. I created a main report that consists of different subreports in the Detail section. I have a couple of queries that create tables for certain cities (the...
6
by: Brett Barry: Go Get Geek! | last post by:
Hello, I have a main report with a Record Source, a DateToday table, that has the current Month and Year. I have about 60 queries, each pulling different data via ODBC, that I am creating...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.