access 2007 SP1 bug: subreport does not print if custom printer

A

Alain Bourgeois

Dear all,

I have a PC with office 2007 pro SP1 installed.
There is an access 2007 application, printing a (custom paper-size)
report on a (non-default) matrix printer.

The report holds a subreport.

The report prints ok... without printing the embedded subreport.

(Of course, the report AND subreport print ok on all previous versions
of access).

Any workaround?

Regards,
Alain
 
A

Allen Browne

Alain, I can't repro this.

What I did was to assign the main report to a specific printer (using Access
2000, because this feature is broken in A2007), and then open the report in
A2007 and preview. It shows fine, along with the subreport.

Did you do something different from that?
For example:
a) Did you also open the subreport in design view and assign it to a
different printer?

b) Does the system you tried this on have exactly the same printer as what
you assigned the subreport to?

c) Does it work if you try opening the subreport itself in print preview?

d) Is Name AutoCorrect turned off?
 
A

Alain Bourgeois

Allen,

a. This feature is repaired in access 2007 sp1.
b. The printer is correctly assigned as main report prints on this
printer, and only subreport is not printed.
c. printPreview is OK using openReport, but I use a macro to print the
report, macro is
selectObject <report>
printout

Regards,
Alain
 
A

Allen Browne

Re your (a), MS says this is fixed in SP1, but it certainly is not on my
system, nor on several others who posted here when SP1 was released. There
must be another factor if some can use this and others cannot.

Re your (b), I still don't whether explicitly assigning the subreport itself
to another printer is a factor here.

Re your (c), I tried creating a macro like this, using SelectObject (with
True for In Database Window), followed by PrintOut. Ran the macro while the
report is not open. The result was that Access 2007 crashed, so I can't
really follow this any further for you.

Faulting module was MsAccess.exe (12.0.6211.1000)
Exception code was c0000005, at offset 001992e7.
OS is Vista (6.0.6001.2.1.0.256.1)
 
A

Alain Bourgeois

Allen,

Nice exception...

(a) Customer had an pc with win xp / office pro 2003 where app was
running fine: custom paper-sized report on custom printer (and same
macro: selectObject then printout), everything OK.

The customer bought new pc with win vista / office pro 2007,
installed same custom printer on this pc and copied the mdb
(application) without doing any change.
=> In this case, reports prints on right printer without gpf but also
without printing the subreport. We will try to set a custom printer in
the subreport in access 2003 then recopying to new pc to see if this
solves the problem. This will give us an info about (b).

(c) We will make a sample .mdb to reproduce the problem and post a link
here as soon as it is done.

Regards,
Alain
 
A

Alain Bourgeois

I didn't have the time to create a sample. Nethertheless, I found a
workaround (and one more change of behaviour in access 2007):
Using the OpenReport action in the macro instead of PrintOut works
without any other change to report and subreports, and without showing
any print dialog box to the user.

In previous versions of access, OpenReport caused a modal print dialog
box to appear (that's why we used printout).

Regards,
Alain
 
A

Alain Bourgeois

Allen,

To reproduce the bug, unzip mdb located in
http://www.kineuro.com/Isol.zip.
This db contains a report with a subreport configured to print on
MicroSoft XPS printer, custom paper size std german folded.


In access 2003(/2002/2000): enable all content(macros), open form
PlusPatient, click go button
-> The printed document shows a subreport above the #error (missing
field).


In access 2007: enable all content(macros + trust folder), open form
PlusPatient, click go button
-> The printed document shows the report without the subreport.

Regards,
Alain
 
A

Allen Browne

Alain, I really don't have time to trace that example through.

You have a cartesian product of a crosstab based on right joins of tables
with no primary keys and literals being substituted, and that's just one of
the branches of the stacked queries for the subreport. It would not surprise
me in the least if A2007 handled it differently.
 
A

Alain Bourgeois

Sorry, I don't agree for the following reasons:
* If I run the query RegAttReport (query on which subform is based), I
get the right result (same as in 2003).
* replacing printout by openreport gives the same result than a
printout in 2003.

If problem was is queries,
* I would not get a different result using printout and openreport.
* opening ReqAttReport would also give a wrong result.
 
A

Alain Bourgeois

I made other tests in 2007:

including another subreport based on a table:
* the macro: selectObject then RunCommand/Print=> Works OK
* the macro: selectObject then PrintOut=> Gpf, subreport labels are
printed but no field values.
It also didn't print on custom printer.

Fortunately, there are still some web sites selling access 2003 ;).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top