0
votes

I developed a DB with MS Access 2013.

I want to printout one report which include 3 subreports (subrA, subrB, subrC) Sometimes #error appears in the PDF (on subrA). It is always on the same textbox.

What is weird is that I always display the report (as preview) and no error appears. see printscreen Then I launch PDF printing and sometimes (not always???) I get the error (after error happening in PDF, I sometimes have error in report preview). see printscreen

My tests :

  • I tried to printout with PDFcreator and DoCmd.OutputTo, same issue happens
  • I tried to replace the subrA (expecting a corrupt report) but I still get the error.
  • I expand the textbox to be sure that it large enough according to the content,
  • If I print all the reports in one time, I never get this issue

It seems to be lack of refresh issue, as if Access do not have time (sometimes) to format the data in the subreport before printing.

Do you have any idea to support me or any idea of what happens ?

Thanks a lot.

Additional information (added the 2018/01/22)

All the data in SUBR_A come from a query. The data code in error is :

SomDom("QtyCalculeIngredient_UProd";"qryProduction_OFDetailsIngredients";"IdProduction=" & [IdProduction] & " AND Ordre<=" & [Ordre])

This call is perhaps to long to perform and this must explain why #error happens sometimes. Do you have any ideas to reduce the request time ?

2

2 Answers

0
votes

A domain function (here DSum()) in the Details section can be problematic.

In your case it seems that you could easily replace that by using the RunningSum property, see:

https://support.office.com/en-us/article/summing-in-reports-ad4e310d-64e9-4699-8d33-b8ae9639fbf4#bmrunningsum

0
votes

Thanks for the support. By the way, I was searching for a workaround on myself and I change the DSUM() by a RunningSum before our post your answer,

Of course, it works very well. Thanks for the tips !!!