Example
1. add textbox and command1 in a Form
2. add label1 and set a caption "Bill No"
4. add dataenvironment1
5. Set connection1 in Dataenvironment of your database file name
5. add command1 in Dataenvironment and type a query in sql as following example
SELECT * FROM BillTable WHERE Billno = ?;
6. Design a report of Datasource : DataEnvironment1 and Datamember Command1
7. Add Click Event of Command Button in Form
Private Sub Command1_Click()
If Dataenvironmanet1.Connection1.State<> 0 Then
Dataenvironmanet1.Connection1.Close
End If
Dataenvironmanet1.Connection1.Open
Dataenvironmanet1.Command1 Text1.Text
DataReport1.Show
End Sub
8. Run This Program
9. Type a bill No in Textbox
10. Click on Command1
You can See only selected BillNo Report
Last Wiki Answer Submitted: January 8, 2010 4:20 am by Jadejaashok60 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
lets make some example, I have one form then i have 4 textboxes, the name,address,age,gender then one button. after filling all the required fields. The inputted datas will normally add to the database, what I want is after clicking the button, I will generate a report just for the details of the my latest action.
I think you will need to be more specific in your question in order to get useful responses.
What exactly is what you don’t know how to do it ?
How do I create a report from daily backup?
lets make some example, I have one form then i have 4 textboxes, the name,address,age,gender then one button. after filling all the required fields. The inputted datas will normally add to the database, what I want is after clicking the button, I will generate a report just for the details of the my latest action.