By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,668 Members | 1,477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,668 IT Pros & Developers. It's quick & easy.

Adjust main report timing to solve null subreport

P: n/a
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 records or
data and I have not found a reliable way to reproduce the behavior.
The subreport can always be generated independently and always prints.

There is data in both the main report and the subreport. The link
child and master fields are correct, though based on a calculated
(mid) field in underlying queries. There are calculations in both
the main and subreports. And both the main and subreports are
compiled from nested queries.

A timing issue has been suggested. To say the main report calculates
before the subreport has finished calculating, leaving the subreport
null. Is there a way to delay main report calculation in order to
allow ample time for the subreport to calculate?

Your insight is greatly appreciated.
Nov 12 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Jacob, I doubt it is a timing issue, unless you have a circular calculation
here, i.e. the calculated field in the MasterLinkFields property is somehow
dependant on something in the subform.

More likely, Access is failing to understand the data type of the calculated
field in the MasterLinkFields property. You say it uses Mid() to pull a
value from within something else? Mid() returns a string type. If you intend
this to be a number, explicitly typecast the result, e.g.:
CLng(Mid([SomeField], 3, 2))

For more information on why and when typecasting is necessary, see:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jacob Barnett" <ng*@isbridge.com> wrote in message
news:80**************************@posting.google.c om...
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 records or
data and I have not found a reliable way to reproduce the behavior.
The subreport can always be generated independently and always prints.

There is data in both the main report and the subreport. The link
child and master fields are correct, though based on a calculated
(mid) field in underlying queries. There are calculations in both
the main and subreports. And both the main and subreports are
compiled from nested queries.

A timing issue has been suggested. To say the main report calculates
before the subreport has finished calculating, leaving the subreport
null. Is there a way to delay main report calculation in order to
allow ample time for the subreport to calculate?

Your insight is greatly appreciated.

Nov 12 '05 #2

P: n/a
Allen ~

Thank you for your reply. The Mid() MasterLink field is actually text:
'11-11-01' denoting site-cycle-meeting.

and is passed through several queries.

???

Best Regards, Jacob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

P: n/a
So, if the result is meant to match against a Number field in the subform,
typecast it in the original query by wrapping Mid() inside CLng() or CDbl()
or whatever.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<it****@isbridge.com> wrote in message
news:40***********************@news.frii.net...
Allen ~

Thank you for your reply. The Mid() MasterLink field is actually text:
'11-11-01' denoting site-cycle-meeting.

and is passed through several queries.

???

Best Regards, Jacob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

P: n/a

Thank you for your reply Allen.

The result is a text field in the master matching against another text
field in the child. Is there a typecast requirement for matcvhing text
fields?

What's most surprising is the subreport is non-printing / appearing some
of the time. If I re-run the report, on the same data, without
restarting, it's likely that it will work. I have been unable to
reliably reproduce the behavior. (!)

Best Regards, Jacob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5

P: n/a
Thank you for your reply Allen.

The result is a text field in the master is matching against another text
field in the child. Is there a typecast requirement for matcvhing text
fields?

What's most surprising is the subreport is non-printing / appearing some
of the time. If I re-run the report, on the same data, without
restarting, it's likely that it will work. I have been unable to
reliably reproduce the behavior. (!)

Best Regards, Jacob
Nov 12 '05 #6

P: n/a
Text should work without typecasting.

Must be something odd.
Perhaps you could note the items that don't match: what is the value in the
MasterLinkFields, and check for the expected match in the ChildLinkFields.
Look for any tendency that looks consistent. Double-check any criteria
involved in the subreport's source, etc.

Not sure what else to suggest.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jacob Barnett" <ng*@isbridge.com> wrote in message
news:80**************************@posting.google.c om...
Thank you for your reply Allen.

The result is a text field in the master is matching against another text
field in the child. Is there a typecast requirement for matcvhing text
fields?

What's most surprising is the subreport is non-printing / appearing some
of the time. If I re-run the report, on the same data, without
restarting, it's likely that it will work. I have been unable to
reliably reproduce the behavior. (!)

Best Regards, Jacob

Nov 12 '05 #7

P: n/a
Indeed it IS something odd. I have looked for consistency and have
found none. The surprising thing is: the report prints usually. When
it doesn't print or preview, it can be re-run and be fine - on the same
data! Sometimes it previews cotrrectly and doesn't print and sometimes
it previews incorrectly and prints correctly.

This is what has lead to a timing speculation.

Know of a way to slow the timing of the main report?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.