|
-
Jun 12th, 2002, 06:00 AM
#1
Thread Starter
Member
For Crystal Report Experts........
Hi all ,
I’m printing a series of reports through VB code.
1. I’m printing 1 record as 1 report. How can I know in between printing which record is printed? I issued print command it shows me printing dialog box 1 by one, but in between light goes off. How can I know my report is printed or not?
My code goes like this :
x = Val(Text1.Text)
y = Val(Text2.Text)
Set db = OpenDatabase("c:\tmp\watchs.mdb")
str1 = "select * from wdetails where tcounter='" & "N" & "' and (invno>=" & x & " and invno<=" & y & ") Order by invno asc"
Set rs = db.OpenRecordset(str1)
If rs.RecordCount > 0 Then
rs.MoveFirst
mins = rs!invno
rs.MoveLast
maxs = rs!invno
rs.MoveFirst
For i = mins To maxs
Cry.Destination = crptToWindow
Cry.DataFiles(0) = "c:\tmp\watchs.mdb"
Cry.ReportFileName = "c:\tmp\repo.rpt"
Cry.SelectionFormula = "{wdetails.invno}=" & i
Cry.Action = 1
‘At this point How can I know report is printed or not? If printed then do updation in table.
rs.Edit
rs!tcounter = "Y"
rs.Update
rs.MoveNext
If rs.EOF() Then
rs.MoveLast
End If
Next i
End If
Pls help me soon…..
Adhikari……
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|