heres my loop and code on how to print mulitple reports
VB Code:
For i = 1 To rsDis.RecordCount Set rsDis1 = New ADODB.Recordset Set rsDis1 = cn.Execute("select * from checktable where account_id = " & i) Set DataReport1.DataSource = rsDis1 DataReport1.Sections(1).Controls("lblAccount").Caption = rsDis1.Fields("chkname").Value DataReport1.Sections(1).Controls("lblDate").Caption = rsDis1.Fields("chkdate").Value DataReport1.Sections(1).Controls("lblTotal").Caption = rsDis1.Fields("chkTotal").Value DataReport1.Sections(1).Controls("lblNum2Wrd").Caption = rsDis1.Fields("chknumtoword").Value DataReport1.Refresh DataReport1.PrintReport False, rptRangeFromTo, 1, 1 rsDis1.Close Next i
if i run this code it will only print once and the only first page will print.. but when i use breakpoints on the datareport1.printreport.. it will print as many times as the loop is.. pls help!


Reply With Quote
