Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB crystal report datasource connection

VB crystal report datasource connection

Scheduled Pinned Locked Moved Visual Basic
databasehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Central_IT
    wrote on last edited by
    #1

    Hi, When I try the following I get an error.... crReport.DataSourceConnections(servername, database, True) "Property access must assign to the property or use it's value" I am trying to assign a database to my crystal report. The reason being I have a test database and a live database. Any ideas where I am going wrong or what I should do?

    D 1 Reply Last reply
    0
    • C Central_IT

      Hi, When I try the following I get an error.... crReport.DataSourceConnections(servername, database, True) "Property access must assign to the property or use it's value" I am trying to assign a database to my crystal report. The reason being I have a test database and a live database. Any ideas where I am going wrong or what I should do?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      I have no idea what you're doing, but DataSourceConnections is a read-only property that returns a collection of IConnectionInfo objects. You cannot assign annything to that property and you definitely can't call it as if it was a method, like your code is doing. I don't use CrystalReports, but perhaps you're looking to do something like:

      crReport.DataSourceConnections.Add(...)
      

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups