开发者

Securing Crystal Reports using Parameter Fields , Validating Parameter Fields

开发者 https://www.devze.com 2023-03-05 20:30 出处:网络
Can a password be set as parameter field in a Crystal Report , OR, could Validations be applied on a parameter field of a Crystal R开发者_如何学Goeport, like , if the user enters the wrong parameter ,

Can a password be set as parameter field in a Crystal Report , OR, could Validations be applied on a parameter field of a Crystal R开发者_如何学Goeport, like , if the user enters the wrong parameter , then the report quits?


You can't make the report quit/exit, but you can definitely hide details/groups/records in a report if the parameter is incorrect.

If they are using Crystal Reports, they can open the report and remove your "password protection", but yes, you can do some pseudo protection if the report is being run in a viewer of some type.

All you would do is create a parameter called {?Password}. Then, within your current record selection, put:

(your previous record selection) AND {?Password} = "yourpassword"

This logic works like any other SQL logic in that the query must be true to return records. In the case above, if the password does not match, the query is false.

That would keep any records from showing up.

Alternatively, you can hide/suppress sections based on similar logic or even show a section if the password is wrong (and hide it if it's right). Within this logic, you could format a section to show "Invalid Password Entered" if the password is wrong.

Make sense?

0

精彩评论

暂无评论...
验证码 换一张
取 消