How to hide the number of records on crystal viewer !

frankolp
10-27-2004, 09:07 AM
Hi there !

When I display my report to the screen, there is a number of record (123 of 123)

Is there a way to hide this information ?

Thank a lot

Frank

MKoslof
10-29-2004, 12:56 PM
Are you using the CRViewer? If so, the CRViewer has tons of properties you can suppress or modify such as the zoom, show page count, show group tree, etc.

frankolp
11-11-2004, 07:54 AM
Hi MKoslof,

I use a dll that use this function :

Private Declare Function PEOutputToWindow Lib "crpe32.dll" (ByVal printJob As Integer, ByVal Title As String, ByVal Left As Integer, ByVal Top As Integer, ByVal Width As Integer, ByVal Height As Integer, ByVal Style As Long, ByVal FenetreParent As Integer) As Integer


Maybe the Style property can change something but I cannot find what value can I put in this property

MKoslof
11-13-2004, 10:52 AM
OK, you should review the Crystal Reports API guide..I believe you can find it on their homepage, do a search. Now, in the form load event and form_paint event, you can customize the window of the Report object, and remove any controls from the standard viewer that you don't want. You would typically do this in the form load and form paint events.



Sub Form_Load ()

Dim LocInfo As PETableLocation
Dim TableN As Integer
Dim Parent As Integer

Screen.MousePointer = Hourglass

If PEOpenEngine() = False Then
MsgBox "Unable to start print engine application"
Unload Me
End If

JobNum = PEOpenPrintJob(APP.Path + "\" + myReportVariableName)

If JobNum = 0 Then
MsgBox "Print engine error, please try again."
Screen.MousePointer = Default
Exit Sub
End If

'pass runtime selection formula if any
r = PESetSelectionFormula(JobNum, Select_Formula)

'set database table location
LocInfo.StructSize = Len(LocInfo)
LocInfo.Location = Database_Path + Chr$(0)

If PESetNthTableLocation(JobNum, TableN, LocInfo) = 1 Then
If PEOutPutToWindow(JobNum, frmReport.Report.ColumnText(3), Left, Top, Width, Height,16777216, Me.hWnd) = False Then
Screen.MousePointer = Default
Exit Sub
End If

If PEStartPrintJob(JobNum, True) = False Then
MsgBox "Job not started"
Screen.MousePointer = Default
Exit Sub
End If
r = PEZoomPreviewWindow(JobNum, PE_ZOOM_FULL_SIZE)
End If

DoEvents
Screen.MousePointer = Default

End Sub

Sub Form_Paint ()
r = PEShowPrintControls(JobNum, True)
End Sub

frankolp
11-15-2004, 03:46 PM
Thank you so much !

I review the Technical Reference Guide and I try the PEShowPrintControls function !
The guide said : Use PEShowPrintControls to display the print controls (First, Previous, Next, and Last Page buttons as well as
the buttons for Cancel, Close, Export, and Print to Printer).

So i don't think I can remove just one of these control !!!

Thank you for your help

Frank

MKoslof
11-17-2004, 06:17 PM
Hmm..good observation :).

I will admit I have not tried what you are doing..but I believe you can implement a callback procedure to the API declaration and hook into it..basically hiding or redrawing the object how you see fit.

Let me see what I can come up with.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum