none
ReportViewer 2005 Runtime DataSource RRS feed

  • Question

  • I am using Visual Basic 2005(Professional) to create Forms and ReportViewer to create Reports. This is a Windows application and the database is SQL Server 2005 Express edition. Its working fine. If the database and the executable application is in the same directory its working fine. Now what I would like to do is to set aside the database in a different drive/directory etc. For this I changed the database source ( Public strConSt As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=c:\VB2005\ABC\myData.mdf;Integrated Security=True;User Instance=True" ) for the forms and its woring fine. How to define the datasource for the reportviewer?

    I created the reports like : 1. I created a dataset using a wizard. 2. Opened a new Report and draged the fields from the dataset. 3. Took a New Form and placed a Reportviewer control and attached the Report. All the databinding were created automatically. Please Help.
    Wednesday, February 24, 2010 5:59 PM

Answers

  • Hi Chandra,

    The connection string should point to a SQL catalog, not a file.
    (Data Source=.\SQLEXPRESS;Initial Catalog=MyDBName)
    Brad Syputa, Microsoft Reporting Services This posting is provided "AS IS" with no warranties.
    • Marked as answer by chandra70007 Saturday, February 27, 2010 7:54 AM
    Thursday, February 25, 2010 6:47 PM