SubReport causing Print Error?? HELP!!

  • Thread starter Thread starter Eka1618
  • Start date Start date
E

Eka1618

Hello,

I am having difficulty understanding what is happening with reports that I
am trying to run.

Example of what I am trying to do:

If I wanted to run rptImpactTestReport for instance (the parent report) I
would like it to return each Lock (L_ID) and Key (K_ID) for a particular
Test Queue (each on a seperate page)

In my database a Test Request (tblRequest) has a 1:M relationship with the
following tables:

tblLock
tblKey
tblTest

Since tblQueue is related to tblTest which is associated to tblRequest which
is associated with both tblLock & tblKey, I have not had any problems
reporting on each lock and key that is related with the Test Queue (Q_INC).

Also within this parent report, I have a SubReport in which I am trying to
list the results (tblResults) that are associated with the particular (L_ID)
& (K_ID) on that page. HOWEVER, sometimes there is NO K_ID value. What I have
done is Linked the Master & Child fields to: Q_INC;L_ID and inside the query
for my SubReport say: K_ID = [Reports].[rptImpactTestReport].[K_ID] OR
[Reports].[rptImpactTestReport].[K_ID] Is Null

Here is my problem,

If I run my query seperate from the report, and test it using the test queue
number I am trying to report on, the database will return the correct number
of records. HOWEVER, sometimes Access return an infinite number of pages to
print.

Please note:THIS IS NOT A PAGE WIDTH PROBLEM

I think it has something to do with my subReport. If I leave the SubReport
out, I do not see this error happening. However, if I use the SubReport,
sometimes it prints out fine, and other times it wants to print hundreds of
pages!

Provided below are the queries used for the parent and sub report. If anyone
has any suggestions, or if anyone needs more infromation to help resolve my
problem, please let me know! Thank You!

qryTestReport (bound to my parent report):

SELECT tblRequest.REQUEST_NO, tblRequest.TITLE, tblRequest.NOTES,
tblQueue.Q_INC, tblQueue.QID, tblQueue.Q_YEAR, tblTest.TEST_TYPE,
tblTest.A_M, tblTest.WRENCH_NO, tblTest.INSTALL_TRQ, tblTest.DESCRIPTION,
tblTest.MIN_TORQ, tblTest.BOTH_DIRECTIONS, tblKey.K_ID, tblKey.K_PART_NO,
tblKey.K_EWO_NO, tblKey.K_SKID_NO, tblLock.L_ID, tblLock.LOCK_LUG,
tblLock.LUG_TOOL, tblLock.L_PART_NO, tblLock.L_EWO_NO, tblLock.L_SKID_NO,
tblTest.TRQ_SHUTOFF, tblLock.L_MOD, tblLock.L_MOD_DESC, tblKey.K_MOD,
tblKey.K_MOD_DESC, tblTest.TEST_ID, tblTest.UNITS, tblRequest.EMP_ID,
tblRequest.CUSTOMER, tblQueue.START, tblQueue.TEST_COND, tblEmployees.EMP_LAST
FROM ((((tblEmployees INNER JOIN tblRequest ON tblEmployees.EMP_ID =
tblRequest.EMP_ID) LEFT JOIN tblKey ON tblRequest.REQUEST_NO =
tblKey.REQUEST_NO) LEFT JOIN tblLock ON tblRequest.REQUEST_NO =
tblLock.REQUEST_NO) INNER JOIN tblTest ON tblRequest.REQUEST_NO =
tblTest.REQUEST_NO) INNER JOIN tblQueue ON tblTest.TEST_ID = tblQueue.TEST_ID;


Here is the subreport query:

SELECT tblResults.Q_INC, tblResults.SAMPLE_NO, tblResults.FAILED_AT,
tblResults.P_F, tblResults.FAIL_LEVEL, tblResults.ON_OFF,
tblResults.FAIL_TORQ, tblResults.PASS_VALUE, tblResults.OBSERVATIONS,
tblResults.L_PART_NO, tblResults.K_PART_NO, tblResults.PAT_NO,
tblResults.PAT_SIZE, tblResults.FAIL_TRQ_LEVEL, tblResults.SHROUD_OVAL,
tblResults.L_ID, tblResults.K_ID, tblResults.L_FAILURE_MODE,
tblResults.K_FAILURE_MODE
FROM tblResults
WHERE (((tblResults.K_ID)=[Reports].[rptHandleTestReport].[K_ID])) OR
((([K_ID]=[Reports].[rptHandleTestReport].[K_ID]) Is Null));
 
New Developments:

I had to set my subqueries details section to shrink. This was turned off.
This ended up solving my problem for some of these reports, but not all of
them.

My example in the last post is actually the same method I use in 7 other
reports. I thought that changing the grow shrink would help, but it is not
helping in each report. Again, this is only occuring ocationally...

Please let me know if you have any suggestions, Thank you!


--
~Erica~


Eka1618 said:
Hello,

I am having difficulty understanding what is happening with reports that I
am trying to run.

Example of what I am trying to do:

If I wanted to run rptImpactTestReport for instance (the parent report) I
would like it to return each Lock (L_ID) and Key (K_ID) for a particular
Test Queue (each on a seperate page)

In my database a Test Request (tblRequest) has a 1:M relationship with the
following tables:

tblLock
tblKey
tblTest

Since tblQueue is related to tblTest which is associated to tblRequest which
is associated with both tblLock & tblKey, I have not had any problems
reporting on each lock and key that is related with the Test Queue (Q_INC).

Also within this parent report, I have a SubReport in which I am trying to
list the results (tblResults) that are associated with the particular (L_ID)
& (K_ID) on that page. HOWEVER, sometimes there is NO K_ID value. What I have
done is Linked the Master & Child fields to: Q_INC;L_ID and inside the query
for my SubReport say: K_ID = [Reports].[rptImpactTestReport].[K_ID] OR
[Reports].[rptImpactTestReport].[K_ID] Is Null

Here is my problem,

If I run my query seperate from the report, and test it using the test queue
number I am trying to report on, the database will return the correct number
of records. HOWEVER, sometimes Access return an infinite number of pages to
print.

Please note:THIS IS NOT A PAGE WIDTH PROBLEM

I think it has something to do with my subReport. If I leave the SubReport
out, I do not see this error happening. However, if I use the SubReport,
sometimes it prints out fine, and other times it wants to print hundreds of
pages!

Provided below are the queries used for the parent and sub report. If anyone
has any suggestions, or if anyone needs more infromation to help resolve my
problem, please let me know! Thank You!

qryTestReport (bound to my parent report):

SELECT tblRequest.REQUEST_NO, tblRequest.TITLE, tblRequest.NOTES,
tblQueue.Q_INC, tblQueue.QID, tblQueue.Q_YEAR, tblTest.TEST_TYPE,
tblTest.A_M, tblTest.WRENCH_NO, tblTest.INSTALL_TRQ, tblTest.DESCRIPTION,
tblTest.MIN_TORQ, tblTest.BOTH_DIRECTIONS, tblKey.K_ID, tblKey.K_PART_NO,
tblKey.K_EWO_NO, tblKey.K_SKID_NO, tblLock.L_ID, tblLock.LOCK_LUG,
tblLock.LUG_TOOL, tblLock.L_PART_NO, tblLock.L_EWO_NO, tblLock.L_SKID_NO,
tblTest.TRQ_SHUTOFF, tblLock.L_MOD, tblLock.L_MOD_DESC, tblKey.K_MOD,
tblKey.K_MOD_DESC, tblTest.TEST_ID, tblTest.UNITS, tblRequest.EMP_ID,
tblRequest.CUSTOMER, tblQueue.START, tblQueue.TEST_COND, tblEmployees.EMP_LAST
FROM ((((tblEmployees INNER JOIN tblRequest ON tblEmployees.EMP_ID =
tblRequest.EMP_ID) LEFT JOIN tblKey ON tblRequest.REQUEST_NO =
tblKey.REQUEST_NO) LEFT JOIN tblLock ON tblRequest.REQUEST_NO =
tblLock.REQUEST_NO) INNER JOIN tblTest ON tblRequest.REQUEST_NO =
tblTest.REQUEST_NO) INNER JOIN tblQueue ON tblTest.TEST_ID = tblQueue.TEST_ID;


Here is the subreport query:

SELECT tblResults.Q_INC, tblResults.SAMPLE_NO, tblResults.FAILED_AT,
tblResults.P_F, tblResults.FAIL_LEVEL, tblResults.ON_OFF,
tblResults.FAIL_TORQ, tblResults.PASS_VALUE, tblResults.OBSERVATIONS,
tblResults.L_PART_NO, tblResults.K_PART_NO, tblResults.PAT_NO,
tblResults.PAT_SIZE, tblResults.FAIL_TRQ_LEVEL, tblResults.SHROUD_OVAL,
tblResults.L_ID, tblResults.K_ID, tblResults.L_FAILURE_MODE,
tblResults.K_FAILURE_MODE
FROM tblResults
WHERE (((tblResults.K_ID)=[Reports].[rptHandleTestReport].[K_ID])) OR
((([K_ID]=[Reports].[rptHandleTestReport].[K_ID]) Is Null));
 
Back
Top