PDA

Click to See Complete Forum and Search --> : data report


qassim
Apr 23rd, 2000, 11:51 AM
Hello,
i want to print 5 record in each page of
data report and should display in print preview

Thank You

Dr_Evil
Apr 24th, 2000, 05:15 AM
This is assuming that you mean the same 5 records for each page.
1.Add data environment, configure connection to database.
2.Add command to connection, click properties, in this window choose SQL statement, then click SQL builder.
3.Choose the table that contains the records you wish to print and drag it on to the SQL Builder. Select the columns you want with checkboxes. Right click on top section of builder, select run to test query. Save & Close.
4.Click Project, add Data Report. Fill in the DataSource property with DataEnvironment name, and Data Member with Query name. Add Labels to the Page Header, add RptTxtBoxes to the detail section. Fill in the corresponding data fields for the txtBoxes & your good to go.
Just add this code to a command button to generate the report & show print preview.

Private Sub cmdPrintReport_Click()
DataReportNAME.Show
DataReportNAME.PrintReport True
End Sub


Hope this will help you out.