473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adjust main report timing to solve null subreport

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
7 2176
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
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
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

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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DFS | last post by:
Main report contains one large graph in the detail band (no detail records). Subreport snakes just fine (5 columns) when opening by itself. When I add it to the main report (in the report...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
3
by: Pecanfan | last post by:
Hi, I've got an access report which contains a sub-report. The sub-report contains various items in a group Footer which culminates in a running sum text box called txtGrandTotal. I want to...
4
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.