473,320 Members | 1,974 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.

Subreport A does not display, Subreport B repeats

I have a Main report in my database with two Subreports ("Level" and "Quality"). Each (sub)report is based on a different query, but all queries include the same field ("Location") from the same table and it appears on each (sub)report for debugging purposes. This field is the Master/Child link.

I have run each subreport independently (both have controls only in their Details section), and they function well (the report repeats for each Location).

The "Location" field is displayed in a bound text box the Detail section of Main (which is grouped by a different field from the Main query). Both subreports also appear in the Detail section.

I would like my report to show:
~~~
"Location"
Level Subreport for that Location
Quality Subreport for that Location
~~~
for each Location (the ~s are meant to separate the report appearance from my question). What currently appears is:
~~~
"Location"

Quality Subreport for that Location
Quality Subreport for the next Location, etc.
~~~
where etc means that Quality Subreports for all locations are shown for each location in the Main report. The blank line between "Location" and the first "Quality Subreport" represents that the Level Subreport does not appear (nothing of its skeleton and nothing of its controls).

Additionally (I mention this only in the hopes that it helps the trouble shooting), I have a rectangle around the Detail section of Main. The extra Quality Subreports appear below the rectangle, something like (except that the vertical edges actually line up, this does not happen when this message posts, sorry):
~~~
__________________________________________________
| "Location" |
| |
|___Quality Subreport for that Location __|
Quality Subreport for the next Location, etc.

~~~
The Format and Data for the subreports are identical apart from the Record Source.

I've been working on this issue for a couple of days. I'm presenting the database tomorrow and I'd like to have this report working by then.

This is my very first forum post and I am new to Access so I apologize for the funny notation. I don't speak much VBA or SQL, so I hope that solutions aren't too complicated.

Many thanks for all help.
Jun 9 '10 #1

✓ answered by whethergirl

Problem Solved!!!!

The missing subreport: I'd been filtering the entries to the Main report (perhaps I should have mentioned that) while I worked out the bugs. I used a criteria for the location in the query that the Main report references. There were no data entries for the Level subreport for those Locations. I stuck some in and now the Level subreport appears. The Level subreport appears only once per Location (as it should).

The repeating subreport: it's query wasn't saving properly before, so (in the query) I had referenced the Location field (from the central table) by giving it a different name/label (I don't know what that's called, but it's when you build the field with "Label: TableName![FieldName]" for example). I closed and reopened the database and the query started saving properly. So I reference the Location field directly and now my subreport doesn't repeat.

2 3554
Problem Solved!!!!

The missing subreport: I'd been filtering the entries to the Main report (perhaps I should have mentioned that) while I worked out the bugs. I used a criteria for the location in the query that the Main report references. There were no data entries for the Level subreport for those Locations. I stuck some in and now the Level subreport appears. The Level subreport appears only once per Location (as it should).

The repeating subreport: it's query wasn't saving properly before, so (in the query) I had referenced the Location field (from the central table) by giving it a different name/label (I don't know what that's called, but it's when you build the field with "Label: TableName![FieldName]" for example). I closed and reopened the database and the query started saving properly. So I reference the Location field directly and now my subreport doesn't repeat.
Jun 9 '10 #2
NeoPa
32,556 Expert Mod 16PB
Sometimes, just laying the problem out clearly (as you've done quite well here - though it's still complicated to understand - it's not a simple problem after all), as is so necessary for sharing on a forum, is enough to trigger your own understanding to find the solution. It's very gratifying when that happens so I'm pleased for you :)

By the way, thanks for posting back with the solution. Threads with solutions are always so much better than those without of course.

Welcome to Bytes!
Jun 10 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jacob Barnett | last post by:
Access 2000 main report does not display subreport data in preview and may or may not print... sometimes. Usually, the entire report is fine. The behavior does not seem to depend on particular...
0
by: Melissa | last post by:
On a form I have multiple subforms. If any of the subforms do not have data, the border of the subform control still shows on the screen and if I print the form, the border is printed. Subreports...
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...
0
by: Rahul Patel | last post by:
i had create one report with subreport and section with drilldown. the subreport is display on user click event i.e on demand subreport. now while i can the subreport in crystal viewer but while...
0
by: MLH | last post by:
I have a main report with a subreport on it. Main name: rptInvoiceMain Sub name: rptInvoiceSubReport The main report is unbound. A fiew calculated controls are all it has. The subreport is...
0
by: C | last post by:
Hi, I have a main Report which has a SubReport. This SubReport also has a SubReport. I set the data of my main Report and Subreport through code DataSet dsMainReport =...
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: roverturf | last post by:
Is there a way to show a subreport's header if the subreport has no data? On a work order report (rptWorkOrder), I have two subreports, one for parts charges (subreportParts) and another for labor...
0
by: Justin K | last post by:
I have an issue with a Crystal Report that I am using in my C# program. I created the report in Crystal Reports XI(R2). The report's datasource is an SQL stored procedure, and contains a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
1
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....

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.