PDA

View Full Version : Printing from Business Objects



wnazzaro
04-27-2005, 07:00 AM
I have a large report in Business Objects v5.0.2. The report stretches across three or more pages horizontially and over 100 pages down. I would like to print only the first page of each group. I've tried working with VB to do this, but haven't been successful. This is what I've tried:
Public Sub PrintSelectPages()
Dim PgNm As Page
Dim CurRpt As Report
Dim CurDoc As Document
Dim i As Integer

Set CurRpt = Application.ActiveReport
Set CurDoc = Application.ActiveDocument

For i = 1 To CurRpt.NumberOfPages Step 4
CurDoc.PrintDialog
SendKeys "%g", Wait:=True
SendKeys CStr(i), Wait:=True
SendKeys "{Tab}", Wait:=True
SendKeys CStr(i), Wait:=True
SendKeys "{Enter}", Wait:=True
Next
End Sub

Is it possible to do what I am trying to do? Any help is greatly appreciated.