944,052 Members | Top Members by Rank

Ad:
Apr 23rd, 2007
0

help me pls~~ data report data section does not match data source

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kkh86 is offline Offline
1 posts
since Apr 2007
Aug 12th, 2007
0

Re: help me pls~~ data report data section does not match data source

Click to Expand / Collapse  Quote originally posted by kkh86 ...
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
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. set datareport.datasource= ar
Reputation Points: 10
Solved Threads: 0
Newbie Poster
epok13hart is offline Offline
10 posts
since Aug 2007
Aug 13th, 2007
0

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: working with calendars
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to store & retrieve dates from MS access databse





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC