2014年8月25日 星期一

Creating a Report Connected to a Secure SQL Server Database

請參考來源:MSDN Creating a Report Connected to a Secure SQL Server Database
--
1.In Solution Explorer, right-click the project name that is in bold type, point to Add, and then click Add New Item.
2.In the Add New Item dialog box, in the Templates view, select the Crystal Report template.
3.In the Name field, enter the name "NorthwindCustomers.rpt", and then click Open.
Note   If you have not registered before, you may be asked to register. To find out how to register, see Crystal Reports Registration and Keycode.
4.In the Create New Crystal Report Document panel of the Crystal Reports Gallery dialog box, select Using a Report Wizard.
5.In the Choose an Expert panel, select Standard. Click OK.
The Standard Report Creation Wizard window appears.
6.In the Available Data Sources panel, expand the Create New Connection folder.
7.From the subfolder that opens, expand the OLE DB (ADO) folder.
The OLE DB (ADO) window appears.
8.Select Microsoft OLE DB Provider for SQL Server, and then click Next.
9.Enter the values for your database server, user id and password into the Server, User ID and Password fields.
10.From the Database drop down list, select "Northwind."
11.Leave the Integrated Security checkbox unchecked because you are using SQL Server authentication instead of NT authentication.
Click Finish.
The OLE DB folder is now expanded, showing your database server, and within it, the Northwind database.
12.Expand the nodes Northwind, dbo, and Tables, and then select the Customers table.
13.Click the > symbol to move the table into the Selected Tables panel, and then click Next.
14.Expand the Customers table, and then hold down the Ctrl key while you click CompanyName, ContactName and City.
15.Click the > symbol to move these fields into the Fields to Display panel, then click Next.
16.In the Available Fields panel, under Report Fields, select Customer.City, then click the > symbol to move the field into the Group By panel, and then click Finish.
The NorthwindCustomers report is created and loaded into the main window of Visual Studio.

沒有留言:

張貼留言