Click here to Skip to main content
15,895,606 members
Articles / Programming Languages / Visual Basic

Decrypting Data in Crystal Reports

Rate me:
Please Sign up or sign in to vote.
4.79/5 (24 votes)
27 Dec 2003CPOL6 min read 168.1K   2.1K   33  
How to decrypt data for Crystal Reports using formulae to automate your managed code with User Function Libraries.
��IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'SkillBuilder')

	DROP DATABASE [SkillBuilder]

GO



CREATE DATABASE [SkillBuilder]  ON (NAME = N'SkillBuilder_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\SkillBuilder_Data.MDF' , SIZE = 1, MAXSIZE = 10, FILEGROWTH = 10%) LOG ON (NAME = N'SkillBuilder_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\SkillBuilder_Log.LDF' , SIZE = 1, MAXSIZE = 10, FILEGROWTH = 10%)

 COLLATE SQL_Latin1_General_CP1_CI_AS

GO



exec sp_dboption N'SkillBuilder', N'autoclose', N'true'

GO



exec sp_dboption N'SkillBuilder', N'bulkcopy', N'false'

GO



exec sp_dboption N'SkillBuilder', N'trunc. log', N'false'

GO



exec sp_dboption N'SkillBuilder', N'torn page detection', N'true'

GO



exec sp_dboption N'SkillBuilder', N'read only', N'false'

GO



exec sp_dboption N'SkillBuilder', N'dbo use', N'false'

GO



exec sp_dboption N'SkillBuilder', N'single', N'false'

GO



exec sp_dboption N'SkillBuilder', N'autoshrink', N'true'

GO



exec sp_dboption N'SkillBuilder', N'ANSI null default', N'false'

GO



exec sp_dboption N'SkillBuilder', N'recursive triggers', N'false'

GO



exec sp_dboption N'SkillBuilder', N'ANSI nulls', N'false'

GO



exec sp_dboption N'SkillBuilder', N'concat null yields null', N'false'

GO



exec sp_dboption N'SkillBuilder', N'cursor close on commit', N'false'

GO



exec sp_dboption N'SkillBuilder', N'default to local cursor', N'false'

GO



exec sp_dboption N'SkillBuilder', N'quoted identifier', N'false'

GO



exec sp_dboption N'SkillBuilder', N'ANSI warnings', N'false'

GO



exec sp_dboption N'SkillBuilder', N'auto create statistics', N'true'

GO



exec sp_dboption N'SkillBuilder', N'auto update statistics', N'true'

GO



use [SkillBuilder]

GO



if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spAddEncrypted]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)

drop procedure [dbo].[spAddEncrypted]

GO



if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblTestEncrypt]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[tblTestEncrypt]

GO



CREATE TABLE [dbo].[tblTestEncrypt] (

	[fldTestEncrypted] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 

) ON [PRIMARY]

GO



SET QUOTED_IDENTIFIER ON 

GO

SET ANSI_NULLS ON 

GO



create proc spAddEncrypted

	@fldTestEncrypted nvarchar(200)

	as

insert into

	tblTestEncrypt

values

	(@fldTestEncrypted)



GO

SET QUOTED_IDENTIFIER OFF 

GO

SET ANSI_NULLS ON 

GO



By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
Australia Australia
Simon Segal resides in Melbourne Australia, is a certified MCAD, MCSD, MCDBA, MCSE, MCST BizTalk Specialist and has been working in the Software Development industry for some 10 years now. His key area of interest are distributed systems / SOA built with Microsoft technologies.

Comments and Discussions