Datareport Error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Datareport Error

  1. #1
    Join Date
    Feb 2013
    Posts
    34

    Datareport Error

    Hello Guys I am using DataReport for my Receipt but i dont use DataEnvirontment And This is My Code..
    Code:
    Private Sub receipt()
    Dim rsReport As New ADODB.Recordset
    
    rsReport.Open "Select Receipt, ProductName, Quantity, TotalPrice From Dailyrecord", acd, adOpenForwardOnly
    
    If rsReport.RecordCount > 0 Then
    
        Set DataReport1.DataSource = rsReport
            With DataReport1
                .Sections("Section2").Controls("lblreceipt") = "Receipt"
                .Sections("Section1").Controls("txtproduct").DataField = "ProductName"
                .Sections("Section1").Controls("txtqty").DataField = "Quantity"
                .Sections("Section1").Controls("txtotal").DataField = "TotalPrice"
                .Show
            End With
    
                End If
    End Sub
    Help Me guys to find what what is the problem of my code.. thanks

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,830

    Re: Datareport Error

    It would help if you told us what the error was and where it occurs.
    Always use [code][/code] tags when posting code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center