Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
V 9, How to Print/Export data from the current view only
Message
From
17/09/2004 13:21:16
 
 
To
16/09/2004 13:51:18
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00942836
Message ID:
00943499
Views:
17
John,

I've not tried to do custom printing of a single view. It will take some research. I'll use your code as a starting point, but don't expect a quick reply as other things must take a higher priority.

>Craig this is the code taken from the PrintButtonClicked Event of the Viewer.
>
>*****************************************
>*-- PrintButtonClicked Event code... *
>*****************************************
>
>*** ActiveX Control Event ***
>LPARAMETERS usedefault
>
>usedefault = .F.
>
>*-- This.oReport holds a reference to the CR report object...
>DO FORM FrmRdcPrintOptions WITH This.oReport
>
>
>*********************************************
>*-- Init Event Code of FrmRdcPrintOptions *
>*********************************************
>LPARAMETERS Par_oRpt
>
>=DODEFAULT()
>
>LOCAL oPrintStatus
>
>WITH ThisForm
>
> .Caption = LangConv("Print options")+"..."
> .AddProperty("oReport")
> .oReport = Par_oRpt
>
> WITH .opgPrintRange
> .Option1.Caption = LangConv("All")
> .Option2.Caption = LangConv("Pages")
> ENDWITH
>
> .lblPrinterName.Caption = Par_oRpt.PrinterName
> .lblCopies.Caption = LangConv("Copies")+":"
> .lblPrintRange.Caption = LangConv("Print range")
> .chkCollated.Caption = LangConv("Collate copies")
>
> oPrintStatus = Par_oRpt.PrintingStatus()
> .txtStopPage.Value = oPrintStatus.NumberOfPages
>
>ENDWITH
>
>
>*********************************************
>* Code for OK Button Click() *
>*********************************************
>
>LOCAL lPrompt, nNumCopies, lCollated, nStartPage, nStopPage
>
>WITH ThisForm
>
> lPrompt = .F.
> nNumCopies = INT(.spnNumCopies.Value)
> lCollated = .chkCollated.Value
> nStartPage = INT(.txtStartPage.Value)
> nStopPage = INT(.txtStopPage.Value)
>
> IF .opgPrintRange.Value = 1
> .oReport.PrintOut( lPrompt, nNumCopies, lCollated, nStartPage )
> ELSE
> .oReport.PrintOut(lPrompt, nNumCopies, lCollated, nStartPage, nStopPage)
> ENDIF
>
> .Release()
>
>ENDWITH
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform