Friday, 6 February 2015

Data Source or Data Base connection creation


1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16


          A Report is required a "Data Source or Database connection creation" to fetch the data from data base. We can create 'Data source' in two ways.

  • Shared Data Sources
  • Data Sources

Shared Data Sources:
      If we create a 'Data source' under 'Shared Data Sources', we can call this data source into all other reports which are under the same solution.

  • Go to 'Solution Explorer'
  • Select 'Shared Data Sources' and right click.
  •  Select 'Add New Data Source'. Then 'Shared Data Source Properties' window will open.
    • Name: We need to give required Data source name. 
    • Type: Select the server type, my server SQL server so i am going to use 'Microsoft SQL Server'. 
    • Connection String: If we have connection string then we type or past it in the text box. If we don't have then we can create using "Edit" button.
  • Click on "Edit.." button. Then "Connection Properties" window will open.
  • Give the server name, authentication and select the "Database name".
 
  • Click on "Test Connection" button to make sure connection is good.
  • Click on "OK" button.
  • Click on "OK" button. The Shared Data Source is created.

  
Data Sources:
      This 'Data Source' is a report level, we cannot call this data source into other reports. Even those reports are present in the same solution.
  •  Go to 'Report Data'
  • Select 'Data Sources' and right click on it. Then 'Add Data Source..' option will come.
  • Select the 'Add Data Source..'. Then 'Data Source Properties' window will open.
 
    • Name: We need to give required Data source name. 
    • Type: Select the server type, my server SQL server so i am going to use 'Microsoft SQL Server'. 
    • Connection String: If we have connection string then we type or past it in the text box. If we don't have then we can create using "Edit" button.
    • "Make this a shared data source": If we check this option, then that Data source we can use it in the other reports under same solution.
    • Use Shared data source reference: If we have shared data source then we can check this check box then, drop down will enable we can select required data set.
  • Click on "Edit.." button. Then "Connection Properties" window will open.
  • Give the server name, authentication and select the "Database name".
 
  • Click on "Test Connection" button to make sure connection is good.
  • Click on "OK" button.

  • Click on "OK" button.
  • Data source is created.



No comments:

Post a Comment