Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting

Post new topic   Reply to topic
How to generate the report from the Adodc and Data Grid?
View previous topic :: View next topic  
Author Message
Wil
Newbie


Joined: 25 Aug 2005
Posts: 9

PostPosted: Aug 29th, 2005 09:01 PM    Post subject: How to generate the report from the Adodc and Data Grid? Reply with quote

Is there anyone can help me to generate report from a form with using Adodc to insert the data and use data grid to represent the output of inserting data.
Code:

Private Sub cmdSummit_Click()
    response = MsgBox("Confirm to add new record?", vbYesNo)
   
    If response = vbYes Then
        Call callDatabase
       
        With myset
        .AddNew  ' add new record
        ' you can write by this way and also by the following
        ' method
        .Fields("ID").Value = txtItem.Text
        !Type = txtType.Text
        !Quantity = txtQuantity.Text
        !DateOut = txtDate.Text
        !Requirement = txtRequirement.Text
        !Room = txtRoom.Text
       
            If .Fields("Room").Value = txtRoom.Text Then
            .Update ' after add in update the database
            txtItem.Text = ""
            txtType.Text = ""
            txtQuantity.Text = ""
            txtDate.Text = ""
            txtRequirement.Text = ""
            Index = txtRoom.Text
            txtRoom.Text = ""
            frmPurchaseForm.Refresh
            frmInterface.cmdRoom(Index).Enabled = True
            frmInterface.Refresh
            MsgBox "Item's Data Stored."
            End If
        .Requery
        End With
   
    Else
        MsgBox "Operation cancelled", vbCritical
            txtItem.Text = ""
            txtType.Text = ""
            txtQuantity.Text = ""
            txtDate.Text = ""
            txtRequirement.Text = ""
            txtRoom.Text = ""
       
    End If
   
End Sub

Above is show about the code for me to insert the data into the database name CustomerOrder.Then the frmInterface will alocated with a number of button with name cmdRoom(Index).After insert the data with a room number then the cmdRoom(Index) will be enabled it and which can be click it and a form will display with using the data grid control.Then, now the problem is i need to generate the report from that data grid and is there any way to help me to settle with it.Thanks...
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic