Fastreport.net using: [2] Add MSSQL data Source One

Source: Internet
Author: User
Tags mssql

How to use MSSQL tables as a data source

1. Open the Data Source Add Wizard by clicking Data->add Data Source menu item in Fastreport Designer.

2. Add a new data connection.

Click New Connection to open the Data Connection dialog box.

(1) Select the data connection type: MS SQL connection;

(2) Select the database service (if it is the default instance, enter it directly. or (local));

(3) Select login account;

(4) Select the default database.

Finally, you can click "Test Connection" to test the connection.

After a successful creation, you can modify the data connection name and see the resulting data connection string.

3. Select the data table you want to add.

Take the student elective course as an example, including student table (student), Curriculum (course), Course selection Relationship form (SC)

4. Finally, you can see the selected data source in the Data source window

How to use the MSSQL custom query as a data source

1. Click Connection_test Data Source to edit the data view and go to the datasheet selection screen.

2.

In the third step of the table select interface, click on the "Add SQL Query" button to enter the Query Add Wizard.

You can modify the query resource name by default to table.

3. Add the SQL query statement.

SELECT SC. StudentID as ' study number ', St.name as ' name ', CourseID as ' account number ', Co.name as ' account name '

From SC SC

JOIN Student St on SC. Studentid=st.id

JOIN Course CO on SC. Courseid=co.id

The Query Builder is also available, click "Query Builder" to enter.

4. Set the incoming parameters, which is used without a parameter query, skip this step directly

5. Set the query column.

The interface shows the columns generated by the query statement, which can be modified, added to the computed column, and so on.

Then, the table data source that you just added is more in the data source selection interface. Select the data source.

Fastreport.net using: [2] Add MSSQL data Source One

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.