Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Parameter check against database value
Parameter check against database value [message #1455383] Wed, 29 October 2014 10:04
Rene Kimmelmann is currently offline Rene KimmelmannFriend
Messages: 1
Registered: October 2014
Junior Member
Hi BIRT experts
I would like to compare a database value to a parameter value.
I need to ensure that only authorized users can launch a report. In the database the encrypted password is stored. In a report parameter, the user enters his password. It has to be compared with the password in the database.
From the Data Set Query I get the password. How can I reference this in the password validation script of the report parameter?
In other words, how can I pass a value from the dataset to the report parameters?

Thanks a lot!

Example:
Query getUserCredentials:
SELECT
user AS userid
, pw AS password
FROM
SCHEMA.TABLE
WHERE
user = UPPER ('XYZ') ;

***********************************

Report Parameter '{}password' (it's a Text Box), script validate:
importPackage(Packages.blabla.bla);
var encrypt = new SecurityHelper().digest(params["password"].value); //SecurityHelper is a custom Java class that works fine.
var password = ***a the reference to <password> from getUserCredentials query***;

if (encrypt.equals(password))
{true}
else
{false};
Previous Topic:Reading Excel Merged Cells
Next Topic:send array in report with etParameterValue
Goto Forum:
  


Current Time: Fri Apr 19 07:52:03 GMT 2024

Powered by FUDForum. Page generated in 0.01631 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top