Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 691801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:35:01+00:00 2026-05-14T02:35:01+00:00

I have some Crystal Reports connecting to a Sql Server db that I would

  • 0

I have some Crystal Reports connecting to a Sql Server db that I would like to detect whether the connection is trusted or whether I need to supply the log on info (reports are not supplied by me so I can’t control the connect method). If I just blindly supply login credentials, it won’t connect if it is a trusted connection.

The following does not work:

oRpt = oCR.OpenReport("C:\MyReport.rpt")

if oRpt.Database.Tables(1).ConnectionProperties.Item("Integrated Security") = True then 
       'trusted connection
    else
       'supply login credentials
    end if

It gives the following error:
Operator ‘=’ is not defined for type ‘IConnectionProperty’ and type ‘Boolean’.

I cannot find how create a construct in vb.net for IConnectionProperty. I can’t find any documents from Crystal that explain it.
I am using Crystal Reports XI – Developer

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:35:01+00:00Added an answer on May 14, 2026 at 2:35 am

    I think i found the answer. By using the property ConnectBufferString

    Like this:

    Console.WriteLine(oRpt.Database.Tables(1).ConnectBufferString.ToString)
    

    It will give you a string like this

    Provider=SQLOLEDB;;Data Source=MYPC\SQLEXPRESS;;Initial Catalog=sample_db;;User ID=;;Password=;;Integrated Security=-1;;Use DSN Default Properties=0;;Locale Identifier=1033;;Connect Timeout=15;;General Timeout=0;;OLE DB Services=-5;;Current Language=;;Initial File Name=;;Use Encryption for Data=0;;Replication server name connect option=;;Tag with column collation when possible=0

    You just look for the following:

    Integrated Security=-1 = Trusted Connection

    Integrated Security=0 = Untrusted Connection

    Hope this helps someone else since I wasted a few hours looking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Crystal Reports that were created using Crystal (external to Visual Studio)
I have been asked to convert a legacy app containing some crystal reports from
I have a crystal report that is connecting to a database. The datatable from
I have embedded some crystal reports in my C# application. The problem is, compiling
I have some reports developed using Crystal Reports 12 and I want to version
I have some UI in VB 2005 that looks great in XP Style, but
We have some input data that sometimes appears with &nbsp characters on the end.
I have some classes layed out like this class A { public virtual void
I have some code like this in a winforms app I was writing to
We have some files on our website that users of our software can download.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.