CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  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
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    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
  •  





Click Here to Expand Forum to Full Width

Featured