tibet_a 发表于 2015-12-10 15:04:00

请教曾工,arp9编辑报表状态不能预览

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 "Parameters" 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 "PostalCode")
    13. Click "Preview 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=admin;Password=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).
页: [1]
查看完整版本: 请教曾工,arp9编辑报表状态不能预览