You are on page 1of 8

Steps to Create Data Report 1.

Right click the form in the project explorer and select Add Data Environment (If the Data Environment is not available, select Project menu, select Components and choose the Designers tab and make a check mark for Data Environment and Data Report).

2. Change the Name property of Data Environment to deEmployee. 3. Rename the Connection1 to connEmployee.

4. Right click the connEmployee connection and select Properties.

5. Follow the steps from 15 to 17 to establish a connection to Oracle. 6. Right click the connEmployee connection and select Add Command.

7. Right click Command1 and select Rename and change it to cmdReportAll. 8. Right click cmdReportAll and select Properties.

9. Select the Database Object as Table and Object Name as EMPLOYEE from the Properties window.

10. Explore the cmdReportAll and check all the columns in the EMPLOYEE table are loaded.

11. Right click the form in the project explorer and select Add Data Report.

12. Change the Properties of Data Report as below: Property Name DataSource DataMember Value drReportAll deEmployee cmdReportAll

13. Choose Window option from the menu bar and select Tile Horizontally. 14. Select Window option from the menu bar and choose Tile Horizontally.

15. Drag and drop the cmdReportAll from the Data Environment to the Detail (Section1) in Data Report.

16. Add a command in the existing form and write the code as:
Private Sub cmdReportAll_Click() drReportAll.Show End Sub

17. After selecting the Report command the output may be as bellow:

18. Add one more Command in the Connection and rename it cmdReportIT. Select the Source of Data as SQL Statement and type the statement as per your requirement.

19. Follow the steps as like drReportAll.

You might also like