Tuesday 14 February 2017

How to create data report?

1.      Firstly Create database
2.      Add Data Report from Project menu
3.      Again Add Data Environment and a window is open whose name is Project1- DataEnvironment1
4.      Right Click On connection1 from Project1- DataEnvironment1 window and select properties
5.      Select Microsoft jet 4.0 OLE DB Provider or Microsoft jet 3.51OLE DB Provider and click next button
6.      Provide database name->test connection->ok
7.      Again right click on Connection1 and select Add Command
8.      Right click on Add Command, a dialog box is open, set Database Object as a table and set Object Name as Table Name ->apply->ok
9.       Set DataMember(that is DataEnvironment1) and DataSorce(that is Command 1) of Data Report.
10.  Drag Command1 from DataEnvironment1, drop in Data Report detail section
11.   Rearrange data if you needed
12.  Write code in and command button for showing it
Private Sub Cmd_Click()
DataReport1.Show

End Sub

No comments:
Write comments