Print Page | Close Window

Running a SQL script before Crystal report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13712
Printed Date: 06 May 2024 at 2:46pm


Topic: Running a SQL script before Crystal report
Posted By: johnsp1234
Subject: Running a SQL script before Crystal report
Date Posted: 11 Jul 2011 at 4:24pm
I have a Crystal report that pulls information from a SQL Database with an encrypted column holding sensitive data <null> until you run the script.

The script looks something like :

SELECT CCDataKeyname FROM SystemInformation
GO
OPEN SYMMETRIC KEY CCDataKey20110707030048
DECRYPTION BY PASSWORD = 'xxxxxxxxxxxxxxx'
GO
select SerialNo from ExtCardSystemMovements

After I do this I can use this field 'SerialNum' in my Crystal report.

Is there a way in Crystal to get this command to de-crypt this field before I run the actual command?

Select ccdatakeyname from param < ="text/" ="http://s.experts-exchange.com/00220/s/attachments_ed1fe22aa1ae2d7b79cd8aa377709769.js">



Replies:
Posted By: lockwelle
Date Posted: 13 Jul 2011 at 4:06am
if you did it in a stored proc, you should be able to retrieve the data in clear text.  I doubt that you can do it two stages from inside of CR (1 get the data, 2 decipher it)
 
HTH



Print Page | Close Window