Subreports not printing, but show up fine in Report View

Which group of links does the problematic one belong to?

The two problem subreports are each linked to different things on the main report, but they are both in the group footer, moving them from the group footer to the detail section didn't help (in addition, they can't go there anyway).
 
Does just having one there work?
 
Yep, removing one makes the other one work.
 
Does the other work if on its own?
 
I'd guess that you've reached the limit
 
I'd guess that you've reached the limit

Apparently so - I can't think of any other conclusion that fits the facts. I guess I will have to find some other way to get this data on the report that doesn't involve a 6th subreport.
Thanks for your help guys!
 
I'm glad to hear that your problem is solved, Alisa. Does anyone have any insight on the issues I'm experiencing?

-Eric
 
I forgot to mention - I tried removing all but one of the subreports and it still doesn't work. I also made a version of the DB with local tables instead of linked tables, and that didn't work either.

-Eric
 
Eric, sorry to see that nobody has come up with any additional suggestions for you.

One thing I tried in addition to everyones' suggestions was decompiling and then compacting and repairing the database, just in case it would help (it didn't, but it is worth a try for you anyway).

I suspect that this is an access bug that will be fixed in some future service pack. Why? Because when I remove one of the OTHER subreports, the two problem subreports do not print correctly, so it can't be an issue of simply exceeding the maximum number of subreports. Also, in your case, you have fewer subreports than I do and it is still not working correctly.

The fact that the report comes out fine in print preview, but just doesn't print correctly, tells me that there is some break down between rendering the report in the Access print preview and rendering the report to the printer. Something that has nothing to do with the report itself.

Anyhow, I will keep an eye on this thread in case any genious comes through with a solution. In the meantime, I am off to completely restructure my report :mad:
 
Ok, I just solved my own problem, but it still makes no sense. The recordsources of all the subreports are queries. I ran the query for one of the problem subreports to a temp table, and bound the subreport to the table rather than the query. Voila, prints perfectly. This works with SELECT * FROM temptable and if it is directly bound to the temp table. It doesn't make any sense to me - if it prints off the temp table, it should print off the query. But it solves my problem without having to restructure the entire report, so I am not complaining. Anyone want to speculate on why this worked? :confused:
 
Thanks for the suggestion, but in my case the subreports are already bound to seperate tables and queried for results. The one thing that is bugging me is that in your case, like many others I've seen mentioned elsewhere on the net, the print preview is working fine, but printing is not. In my case, the subreports aren't even showing up in Print Preview (though they are fine in Report View).
 
Thanks for the suggestion, but in my case the subreports are already bound to seperate tables and queried for results. The one thing that is bugging me is that in your case, like many others I've seen mentioned elsewhere on the net, the print preview is working fine, but printing is not. In my case, the subreports aren't even showing up in Print Preview (though they are fine in Report View).

I think I may have been unclear - in my case, when I opened the report in Access to look at it ("print preview"), it looked fine, but when I clicked print and looked at my printer's print preview, the subreports were blank. I think I was using "print preview" to refer to two different things. I think that is the same thing that is happening to you. Are the subreport queries like "SELECT * FROM Table"? Or do they have lots of joins and where clauses in them? The reason I am asking is because in my case, the queries for the problematic subreports were very complex, and I was speculating that maybe that complexity was just overwhelming the access printing ability.
 
Are you using Access 2003 or earlier? In Access 2007, there is a seperate view available for reports that is not apparently available in earlier versions - the Report View, which shows the report and its data on the screen in a continuous format - not broken up into pages. If I switch to the Print Preview view mode, the subreports disappear, and if I print to the printer, the printout is also missing the subreports.

My subreport queries are pretty simple - just a select statement with one join (showing the fields from a table that relate to the current data item in the main report). One hypothesis that I thought of is that for some reason the data is not being queried correctly when Access prepares the report for printing, and this is making Access think that the subreports don't have any data (from what I've heard, Access will not print any part of a subreport if there is no data to print). But this doesn't make any sense to me, as I don't see any signs of query difficulties in Report View, and even when I converted the tables supplying the data from linked tables to local tables, I saw no difference.
 
I am using 2003, so it does sound a little different. Just for fun, I would try creating a temptable of the results and binding the subreport directly to that, just to see if it makes a difference . . .
 
Interesting thought... I'll try that and let you know what happens.

-Eric
 
Interesting.... I just set the subreport to just display the contents of the source table instead of an SQL query, and removed the field links between it and the main report (so all entries in the table show up in each main report entry's report 'page'), and it shows up fine, both in Report View and Print Preview. As soon as put the Link Master Fields and Link Child Fields back in, the subreport stops showing up in Print Preview. I don't know what that means, but at least it might help someone point me in the right direction. :)

-Eric
 
Maybe instead of linking, use a where clause on your SQL and see if that changes anything?
 
That sounds like a possibility, but I'm a bit confused on how to set it up - I know how to do SQL queries, but (assuming I'm supposed to be editing the query that supplies the data to the subreport) how do I reference the main report's items in the subreport's query?
 
SELECT * FROM YourTable WHERE YourTableField = Reports!YourReportName.YourReportField;
 

Users who are viewing this thread

Back
Top Bottom