Preview Report works, printing does not

  • Thread starter Thread starter Matt Slattery
  • Start date Start date
M

Matt Slattery

I am in a bit of a bind with a report I am working on at the moment and any
light shed would be greatly appreciated.

For a bit of background info first:
The report's data source is based on a query with a sub-query (both queries
have a fair few calculated fields - these do not seem to cause any problems)
The report has a simple sub report (this sub report seems to be causing
problems)
The report is opened from a form with a SQL filter based on user selections
Split Database (Front end / back end)
Access 2002 on Win 2000 or Win XP

Problem Details:
The report displays perfectly on screen when in preview, but when the print
button is pressed an error is generated:
"An expression is typed incorrectly or is too complex to be evaluated." - or
thereabouts.
When OK is clicked - the report continues to print but none of the sub
report data gets printed - even though it is displayed on screen!
No error is generated if the report is run with the sub-report removed - I
have looked over the sub-report and it's query and cannot find any problems.

Hopefully someone here has had a similar problem and can provide some help
or advice.

My thanks and appreciation for any advice,
Matt Slattery
 
Hi Matt

This error can occur if Access is unable to match up the data from the Link
Master Fields to the data in the matching fields in the subreport. One
reason for that is if the data types don't match.

More info:
Calculated fields misinterpreted
at:
http://members.iinet.net.au/~allenbrowne/ser-45.html

It is curious that it works in preview. Is there any code running in this
report? The code would run twice: once for preview, and again for print.
Resetting the values in the Format event of the Report_Header section might
help.
 
Thanks for the reply Allen,
I have still not completely tracked down the problem - although you have
given me food for thought.
As an interesting little addition - if I open the report as acViewNormal and
put it straight to the printer,
the data in the sub report comes out correctly. If I acViewPreview and then
print - I do not get the
sub report data.
There is no event code running in these reports (there are some VBA
functions), but I have eliminated
these as the problem through testing.

At this point of time it almost appears to be an internal Access application
problem - but I am still searching
for a suitable explanation.

Again - any input into this would be greatly appreciated.
Regards,
Matt Slattery
 
Back
Top