【问题标题】:VB6 Data Reports do not match datasource using ADO ShapeVB6 数据报告与使用 ADO 形状的数据源不匹配
【发布时间】:2015-11-18 01:45:36
【问题描述】:

我正在尝试让 datareport 工作,因为 dataflexgrid 已经在工作,虽然我很难将值传递给 datareport,但我什至不能传递一个请帮助谢谢。

PS。它们都在一种形式中

Set mRS = New ADODB.Recordset
mRS.CursorLocation = adUseClient
mRS.CursorType = adOpenForwardOnly
mRS.LockType = adLockReadOnly

If mRS.State = 1 Then mRS.Close

mRS.Open "SHAPE {" & _
        "SELECT " & _
        "space(memberstree.level*6) + customer.description, " & _
        "customer.customercode, " & _
        "customer.remarks, " & _
        "customer.membersince " & _
    "From CUSTOMER " & _
        "INNER JOIN memberstree on customer.customercode = memberstree.customercode " & xRootNode & " " & _
        "ORDER by memberstree.pedigree + ltrim(str(memberstree.node,6,0))} AS rsCustomer " & _
        "APPEND (( SHAPE {SELECT transactionNo, logdate, customercode, GrandTotal " & _
    "From FinishedTransaction where " & xCriteria & "} AS rsTransaction " & _
        "APPEND ({SELECT TransactionNo, Description, Qty From FinishedSales} As rsSales " & _
        "RELATE TransactionNo TO TransactionNo))" & _
        " RELATE customercode TO customercode)", gCNMark
 mRS.Requery

Set MSHFlexGrid1.DataSource = mRS

我认为这是行不通的代码

With rptShape
Set .DataSource = mRS
.DataMember = ""


    With .Sections("FinishedSales_Detail").Controls
    .Item("txtDescription").DataMember = "rsSales"
    .Item("txtDescription").DataField = "Description"
    End With

.显示 1

【问题讨论】:

    标签: vb6 report ado


    【解决方案1】:

    现在可以了,我有 3 个 TABLE 和 2 SHAPE 命令,但在数据报告中我有 3 个组标题,也应该是 2。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多