DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   help me pls~~ data report data section does not match data source (http://www.daniweb.com/forums/thread76286.html)

kkh86 Apr 23rd, 2007 10:58 pm
help me pls~~ data report data section does not match data source
 
With rptSalesEnquiryChecklist
Set .DataSource = ar
.DataMember = ""

With .Sections("Section7").Controls
For i = 1 To .Count
If TypeOf .Item(i) Is RptTextBox Then

Select Case .Item(i).Name
Case "txtAddress"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Address").Name

Case "txtSupplier_Company_Name"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Supplier_Company_Name").Name

Case "txtSupplier_Name"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Supplier_Name").Name

Case "txtProduct"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Product").Name

Case "txtContact_No"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Contact_No").Name
End Select
End If
Next i
End With
End With

[img] http://i48.photobucket.com/albums/f245/zykhoo/11.jpg [/img]
why my data report will prompt out this msg box? the data report got subreport or not?

epok13hart Aug 12th, 2007 10:34 pm
Re: help me pls~~ data report data section does not match data source
 
Quote:

Originally Posted by kkh86 (Post 351206)
With rptSalesEnquiryChecklist
Set .DataSource = ar
.DataMember = ""

With .Sections("Section7").Controls
For i = 1 To .Count
If TypeOf .Item(i) Is RptTextBox Then

Select Case .Item(i).Name
Case "txtAddress"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Address").Name

Case "txtSupplier_Company_Name"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Supplier_Company_Name").Name

Case "txtSupplier_Name"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Supplier_Name").Name

Case "txtProduct"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Product").Name

Case "txtContact_No"
.Item(i).DataMember = ""
.Item(i).DataField = ar.Fields("Contact_No").Name
End Select
End If
Next i
End With
End With

[img] http://i48.photobucket.com/albums/f245/zykhoo/11.jpg [/img]
why my data report will prompt out this msg box? the data report got subreport or not?


Quote:

i think u set ur datasource wrongly
is ar the dataenvironment?
check the file name of your source in the properies of the data report

set datareport.datasource= ar

QVeen72 Aug 13th, 2007 4:24 am
Re: help me pls~~ data report data section does not match data source
 
Hi,

Do u have "Section7" yn ur datareport..
If u dont have any Groups and detail section must be "Section1"

Regards
Veena


All times are GMT -4. The time now is 10:15 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC