If you are unable to create a new account, please email support@bspsoftware.com

 

Decrypt data on the fly. Report contains data that cannot be stored decrypted.

Started by kandrews, 14 Aug 2008 06:14:35 PM

Previous topic - Next topic

kandrews

Does anyone have any ideas if it possible to have a "Query Calculation" field in a report
that can call a User Defined Function that is a JavaScript function?

We need to decrypt certain fields on the fly. We cannot store the fields in a decrypted state
in the source database or any temporary area on the file system.

Anyone done this type of thing before?

Any thoughts or ideas much appreciated.

We wanted to keep the function in JavaScript or even java as we support numerous database vendors. If we have to we will
try and create the function within each vendors db and then import that UDF into the report.

Anyone done any decryption on the fly?

Thanks

goose

Hi

You have two options both will work:

Custom Report Function
Cognos allows you to import and use external functions. You could write your decryption function in C++ and use it in your model you would have to test the performance though. The upside of this method is that your decryption function could be database agnostic depending on what your needs are.

Database Function
You could also do this via the database when you query your data by calling a function. Most modern database's support external functions too, so you could apply the same logic as above, else if the database supports your needs natively then you can just create a normal function.

Using javascript is bad idea in my opinion for a number of reasons: browser only solution, wont work in non-html formats, wont work in schedule reports etc etc etc....

Good Luck

Cheers
Angus

kandrews

Hi Angus,

Thanks so much for taking the time to help me.

Very helpful information!

I was hoping the JavaScript wouldn't actually be embedded within the generated page but called on the server and sent across the wire with the report. Maybe this was a dream...

Most of our reports are gen'd as PDF so the point you make about embedding JS not working for PDF's kills that as a solution.

Thoughts?

Any examples on the web?

Thanks


Kent

goose

If you check out the cognos sdk docs they provide a sample function written in C++ and the exact instructions on how to install it.