Report Current Event/ Sub report Question

E

Eka1618

Hello,

I am working on a report (rptSingleKey). What happens is when it is
generated, it will bring up a list of TESTS that are associated with a single
REQUEST.
So far, it works well.

Then I have a sub report (rptRequestorReview). Each TEST has its own REVIEW.
When rptSingleKey is generated, each record and its associated review is
displayed.

This report also needs to show result information. Depending on the TEST
TYPE; results can be different from one another. What I have tried to do, is
insert a tab object and place each result report on its own page. Through the
reports Current event, I code it so that if the test_type = "whatever", that
page will show and the others will not.

This is not working, Each request can have several different kinds of tests.
For example: Request # 25 can have an OFFSET and IMPACT test which both have
different result information. When rptSingleKey is generated for that
request, the result information for both will appear. I have the following
code in my report current event:


Me.TEST_TYPE.SetFocus

If Me!TEST_TYPE.Text = "IMPACT" Then
Me.pgIResults.Visible = True
Me.pgOResults.Visible = False
End If

Me.TEST_TYPE.SetFocus

If Me!Me.TEST_TYPE.Text = "OFFSET" Then
Me.pgOResults.Visible = True
Me.pgIResults.Visible = False
End If


I Know I could use an IfElse instead of two seperate if statements. The
problem is that since one of the records is an OFFSET test and one is an
IMPACT test, the rptSingleKey is making both sub reports show for every
record that is returned by the query.

I hope i do not sound too confusing, but I dont understand why if one object
property for one record must be the same for every record that is returned.

If anyone has any suggestions, please let me know. I am willing to use
buttons if I have to generate this information seperatly, I just wanted the
user to beable to print each test all at once.

~Erica~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top