Link to home
Start Free TrialLog in
Avatar of Ricardo Ferreira
Ricardo Ferreira

asked on

Crystal Reports and Sql Server Always Encrypted

I am using Crystal Reports 2016 and Microsoft Sql server 2016 with Always Encrypted on some columns . How can I programatically add to string connection properties
"Column Encryption Setting=Enabled" to enable the report to obtain the info decrypted ?
My actual code is:
 Dim logInfo As New CrystalDecisions.Shared.TableLogOnInfo
 logInfo = CType(_myReport.Database.Tables(0).LogOnInfo.Clone, CrystalDecisions.Shared.TableLogOnInfo)
logInfo.ConnectionInfo.DatabaseName = connParm.InitialCatalogue
logInfo.ConnectionInfo.ServerName = connParm.DataSource
...
  _myReport.Database.Tables(0).ApplyLogOnInfo(logInfo)
Avatar of Mike McCracken
Mike McCracken

I don't know if that feature is supported.

YOu could pass a dataset to the report as shown here
https://www.emoreau.com/Entries/Articles/2016/10/Crystal-Reports-for-Net-revisited-10-years-later.aspx

I assume you are using VS 20xx and the Crystal Reports for VS SDK.

mlmcc
Avatar of Ricardo Ferreira

ASKER

Thank you for your help. Some of my reports already receive datasets from code and those are ok.
My problem is with reports that obtain information from sql views and tables.
Does the report work from the designer?

Are you changing the database from the application?
If so, this article indicates the standard Crystal SDK cannot do that
https://archive.sap.com/discussions/thread/1007386

What error are you getting?

mlmcc
My problem isn't with the designer.
I am changing the database from the application with the code that I first posted.
The link (https://archive.sap.com/discussions/thread/1007386) is dated 2008, perhaps there is a way to pass the parameter, "Column Encryption Setting=Enabled", in a more recent version of Crystal.
Did you read the full thread of the article I posted?

At the bottom Don Williams says you have to use the TRUSTED SERVER option when you create the connection

When you create a new report using the Database Connection Wizard there is an option to use Trusted Authentication, check this on and the info should propogate to your application. You do require configuring the Server to use NT Authentication or SQL authentication will work also.

mlmcc
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.