Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Before Reading if parameter not correct

Status
Not open for further replies.

RJL1

Technical User
Oct 3, 2002
228
US
Hi again,

I'm trying to secure some financial reports so the dollar amount do not show. I have it working by creatign a PIN number paramenter that supresses the information from displaying if the parameter is not equal to a list of good PIN numbers. However the report still reads all the records.

I saw a function "BeforeReading" and was wondering if this could be used or if there is such a way for the report to check the value of the parameter before it reads the records and if the value is not a godd number then stop the report from reading the record and give a message

Any help with this is appreciated
Thanks
RJL
 
Hi,
Given the info about that function in the OnLine help,
you could maybe use it to cause no records to be returned
from the database but I do not see how to prevent it from accessing the database at all.

For instance if you had a formula like:
@NoData
BeforeReadingRecords;
NOT ({?parameter} IN [your delimited list of PINS ] )

you could use it in the record selection formula like:
(
If @NoData then
1 = 2
else
True
)

AND

...any additional selection criteria you need



Not sure if that is workable, not at a CR location to test.

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You could use it directly in the record selection formula like this:

{?Parameter} in [pin1,pin2,pin3] and
//etc.

...but there is nothing to prevent the user from reading the record selection formula and noting the Pins. Even if you make it read only in report options, someone could change that setting.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top