找回密码
 立即注册

QQ登录

只需一步,快速开始

tibet_a

注册会员

10

主题

15

帖子

110

积分

注册会员

积分
110
tibet_a
注册会员   /  发表于:2015-12-10 15:03  /   查看:3415  /  回复:3

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

3 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2015-12-10 17:00:00
沙发
邮件收到,谢谢。
回复 使用道具 举报
tibet_a
注册会员   /  发表于:2015-12-10 17:05:00
板凳
回复 2楼dof的帖子

曾工,受累了,明天期待您的好消息。
回复 使用道具 举报
frank.zhang
社区贡献组   /  发表于:2015-12-11 15:26:00
地板
您好,

不用数据库使用的占用参数的方式不一致。

可以参考以下文档
Case 1 - OleDB

<Steps>

    1. Open UD
    2. Create new Page/RDL report
    3. Add new DataSource
    4. As connection type use Microsoft OleDb Provider and as OLE DB Provider use Microsoft.Jet.OLEDB.4.0
    5. Fill up connection info to database (e.g. NWIND.MDB) and save DataSource
    6. Add new DataSet
    7. In query tab insert SQL expression with parameter (e.g. "SELECT * FROM Customers WHERE (Country = ? AND City = ?)")
    8. Click "Tab" to validate the query
    9. Go to "arameters" tab of DataSet dialog
        Expected: Parameter1 and Parameter2 is added
    10. Set to parameters values "=[@Parameter1]" and "=[@Parameter2]" accordingly
    11. Save DataSet
    12. Place one or few Fields from DataSet1 to Page (e.g. "CustomerID", "CompanyName", "Address" and "ostalCode")
    13. Click "review report" and fill up parameters with valid values (e.g. Parameter1 = "Germany" and Parameter2 = "Berlin")
    14. Click "View report" button
        Expected: Report is previewed successfully and fields are populated with valid values accordingly to parameters values (e.g. "ALFKI", "Alfreds", "Obere Str. 57" and "12209" accordingly).

Case 2 - ODBC

<Steps>

    1. Steps 1-3 from case 1
    2. As connection type use Microsoft Odbc Provider
    3. Fill up connection string (e.g. "Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\NWIND.mdb") and save DataSource
    4. Add new DataSet
    5. In query tab insert SQL expression with parameter (e.g. "SELECT * FROM Customers WHERE (Country = @Parameter1 AND City = @Parameter2)")
    6. Steps 8-14 from case 1
        Expected: Report is previewed successfully and fields are populated with valid values accordingly to parameters values (e.g. "ALFKI", "Alfreds", "Obere Str. 57" and "12209" accordingly).

Case 3 - SQL Client

<Steps>

    1. Steps 1-3 from case 1
    2. As connection type use Microsoft Sql Client Provider
    3. Fill up connection string (e.g. "user id=sa;data source=192.168.33.45;initial catalog=NWIND;password=123;"), at "Connection Properties" tab set "Save my password" checkbox and save DataSource
    4. Add new DataSet
    5. In query tab insert SQL expression with parameter (e.g. "SELECT * FROM Customers WHERE (Country = @Parameter1 AND City = @Parameter2)")
    6. Steps 8-14 from case 1
        Expected: Report is previewed successfully and fields are populated with valid values accordingly to parameters values (e.g. "ALFKI", "Alfreds", "Obere Str. 57" and "12209" accordingly).

Case 4 - OracleDB

<Steps>

    1. Steps 1-3 from case 1
    2. As connection type use Oracle Client Provider
    3. Fill up connection string (e.g. "User Id=adminassword=1;Data Source=oraserver:1521/xe;"), at "Connection Properties" tab set "Save my password" checkbox and save DataSource
    4. Add new DataSet
    5. In query tab insert SQL expression with parameter (e.g. "SELECT * FROM Customers WHERE (Country = : Parameter1 AND City = : Parameter2)")
    6. Steps 8-14 from case 1
        Expected: Report is previewed successfully and fields are populated with valid values accordingly to parameters values (e.g. "ALFKI", "Alfreds", "Obere Str. 57" and "12209" accordingly).
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部