General information
Title:
Data Report - Group Section, Thank You
Hi,
I'm not using DataEnvironment for datareport, it just assigned a recordset to its datasource, then assign the column to each datafield. It is running well if the data report without group section.
Now it is the problem, I'm doing the samething to group section as I did at the other sections (eg. detail & header), but it prompt a error "Data report sections not match to the data source" (something like that cause I'm using Chinese Ver.). Would you mind to give me some hints on it?
Dim rs As New ADODB.Recordset
Debug.Print "select reqno,req_date,req_dept,req_no,req_na,req_un,req_oq,req_rm from matreq order by req_no,req_un,req_dept,reqno,req_date"
rs.Open "select reqno,req_date,req_dept,req_no,req_na,req_un,req_oq,req_rm from matreq order by req_no,req_un,req_dept,reqno,req_date", status.cn, adOpenDynamic, adLockBatchOptimistic, adCmdText
Set stk_puTotalRpt.DataSource = rs
With stk_puTotalRpt.Sections("section6") 'Group Section
.Controls("text1").DataField = "req_no"
End With
With stk_puTotalRpt.Sections("section1") 'Detail Section
.Controls("text4").DataField = "reqno"
.Controls("text5").DataField = "req_date"
.Controls("text6").DataField = "req_dept"
.Controls("text7").DataField = "req_na"
.Controls("text8").DataField = "req_oq"
.Controls("text9").DataField = "req_rm"
End With
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only