newsgroups-index (beta)

Current group: dbase.binaries

CREPWRAP and faxing problems-VDB5.7 serious CRPEWRAP issue

CREPWRAP and faxing problems-VDB5.7 serious CRPEWRAP issue  
Dennis Levy
From:Dennis Levy
Subject:CREPWRAP and faxing problems-VDB5.7 serious CRPEWRAP issue
Date:Fri, 26 Nov 2004 11:04:32 -0800
This is a multi-part message in MIME format.
--------------030705030008030800020101
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

This is an example of the calling of a report using the CREPWRAP program
.. It is the PREVIEW window. See FAXING problem under programming
Sincerely,
Dennis and Maxine



--------------030705030008030800020101
Content-Type: text/plain;
name="RPTPREV.WFM"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="RPTPREV.WFM"

#include
*
** END HEADER -- do not remove this line*
* Generated on 11/19/2004
*
parameter bModal
local f
f = new RPTPREVFORM()
if (bModal)
f.mdi = .F. && ensure not MDI
f.ReadModal()
else
f.Open()
endif
CLASS RPTPREVFORM OF NAME_FORM From "FORMS.CFM"
Set Procedure To BV55.CC additive
this.OnOpen = CLASS::FORM_ONOPEN
this.Text = "View & Print Reports"
this.Height = 15.7051
this.Width = 84
this.Left = 1
this.Top = 0.3525

DEFINE BV55TEXT TXT_REPORTNAME OF THIS;
PROPERTY;
FontItalic .T.,;
FontSize 10,;
Text "",;
Height 1.5352,;
Width 55.5,;
Left 1.5,;
Top 7.6973,;
Alignment 4

DEFINE BV55LISTBOX LB_REPORTS OF THIS;
PROPERTY;
ID 108,;
Height 5.9893,;
Width 55.5,;
Left 1.5,;
Top 1.5977

DEFINE BV55TEXT BV55TEXT3 OF THIS;
PROPERTY;
Text "Select Report(s) to preview or print",;
Width 55.165,;
Left 1.5,;
Top 0.5,;
Alignment 4

DEFINE BV55PUSHBUTTON PUSHBUTTON_PREVIEW OF THIS;
PROPERTY;
Group .T.,;
UpBitmap "RESOURCE #610",;
Text "Pre&view",;
DownBitmap "RESOURCE #610",;
OnClick CLASS::PUSHBUTTON_PREVIEW_ONCLICK,;
SpeedTip "Preview the report before printing",;
Left 65.8311,;
Top 1.5977

DEFINE BV55PUSHBUTTON PUSHBUTTON_PRINT OF THIS;
PROPERTY;
Group .T.,;
UpBitmap "RESOURCE #857",;
Text "&Print Now",;
DownBitmap "RESOURCE #867",;
OnClick CLASS::PUSHBUTTON_PRINT_ONCLICK,;
SpeedTip "Print the report",;
Left 65.8311,;
Top 3.8262

DEFINE BV55PUSHBUTTON CANCELBUTTON OF THIS;
PROPERTY;
PageNo 0,;
Group .T.,;
UpBitmap "RESOURCE #9010",;
Text "Close",;
OnClick {;form.close()},;
SpeedTip "Quit Print/Preview",;
Left 65.8311,;
Top 6.0596

DEFINE BV55PUSHBUTTON PUSHBUTTON_PRINTER OF THIS;
PROPERTY;
Group .T.,;
Text "Change Printer",;
Height 1.5293,;
OnClick CLASS::PUSHBUTTON_PRINTER_ONCLICK,;
Width 15.668,;
Left 29.1641,;
Top 9.9395

DEFINE BV55TEXT BV55TEXT1 OF THIS;
PROPERTY;
Text "Current Printer:",;
Width 15.835,;
Left 2.3311,;
Top 9.0586

DEFINE BV55DISPLAYFIELD DF_PRINTER OF THIS;
PROPERTY;
Value "",;
Height 1.2354,;
Width 25.335,;
Left 2.3311,;
Top 10.2344

DEFINE BV55SPINBOX SP_COPIES OF THIS;
PROPERTY;
Value 1,;
Picture "999",;
RangeRequired .T.,;
OnChange CLASS::SP_COPIES_ONCHANGE,;
Left 2.3311,;
Top 12.7637

DEFINE BV55TEXT BV55TEXT2 OF THIS;
PROPERTY;
Text "No. of Copies",;
Height 0.8223,;
Width 11.502,;
Left 2.3311,;
Top 11.7637

DEFINE BV55HEADING BV55HEADING1 OF THIS;
PROPERTY;
ColorNormal "W+/R+",;
Visible .F.,;
FontSize 12,;
Text "The report has been previewed / printed. You can close now.",;
Height 4.4697,;
Width 34.332,;
Left 48.5,;
Top 9.6465,;
Alignment 9

DEFINE BV55PUSHBUTTON FAX_BUTTON OF THIS;
PROPERTY;
Group .T.,;
Text "Fax",;
Left 32,;
Top 13,;
OnCLick CLASS::FAX_BUTTON_ONCLICK

Proc Form_OnOpen
super::Form_OnOpen('LL')
form.TXT_REPORTNAME.FontBold = .t.
private cExact
form.cDriver = _pdriver
form.nCopies = _pcopies
form.DF_printer.value = form.cDriver
form.orientation = _porientation
cExact = set( 'exact' )
form.Txt_ReportName.text = ""
** set default company info
do bqbeset.prg

set exact off
if type("form.arrpt") = "U"
use (_app.datapath + "PARMRPT" ) order PARMRPT in select()
select ( "PARMRPT" )
set key to form.cMode
COUNT TO MREC
GOTO TOP
x = 0
IF MREC > 0
form.ARRPT = new array(MREC)
form.ARNME = new array(MREC)
form.ARFIL = new array(MREC)
form.ARland = new array(MREC)
select ( "PARMRPT" )
scan
x = x + 1
form.ARRPT[x] = trim(PARMRPT->RPTDESC)
form.ARNME[x] = trim(PARMRPT->RPTNAME)
form.ARland[x] = PARMRPT->landscape
endscan
else
form.arrpt = new array(1)
form.arrpt[1] = "none"
CLASS::Buttons_Enable( .f. )
ENDIF
set exact &cExact.
USE IN ( "PARMRPT" )
form.LB_reports.datasource = 'array form.arrpt'
endif


Procedure Pushbutton_Printer_OnClick
if chooseprinter()
form.DF_printer.value = _pDriver
endif

Procedure SP_Copies_OnChange
_pcopies = form.SP_Copies.value

Proc Pushbutton_Preview_OnClick

do case
case form.LB_reports.cursel = 0
AlertMessage( "Use left mouse click to select a report.","ALERT" )
otherwise
form.Pushbutton_Preview.enable( .f. )
cRptName = form.arnme[form.LB_reports.cursel]
form.Txt_ReportName.text = 'Current report in progress...please wait'
create session
set lock off
if form.ARland[form.LB_reports.cursel]
_porientation = "LANDSCAPE"
else
_porientation = "PORTRAIT"
endif
do rep2.prg with cRptName
form.Txt_ReportName.text = ""
form.Pushbutton_Preview.enable( .t. )
form.BV55HEADING1.visible = .t.
endcase

Proc Pushbutton_Print_OnClick
do case
case form.LB_reports.cursel = 0
AlertMessage( "Use left mouse click to select a report.","ALERT" )
otherwise
form.Pushbutton_Print.enable( .f. )
cRptName = trim(form.arnme[form.LB_reports.cursel])
form.Txt_ReportName.text = 'Current report in progress...please wait'
create session
set lock off
if form.ARland[form.LB_reports.cursel]
_porientation = "LANDSCAPE"
else
_porientation = "PORTRAIT"
endif
_pcopies = form.SP_Copies.value
private i
for i = 1 to _pcopies
report form &cRptName. to print
next i
form.Txt_ReportName.text = ""
form.Pushbutton_Print.enable( .t. )
form.BV55HEADING1.visible = .t.
IF TYPE("form.lCloseForm") # "U"
IF form.lCloseForm = .t.
form.close()
ENDIF
ENDIF

endcase

Proc Buttons_Enable( lPara )
form.Pushbutton_Preview.enable( lPara )
form.Pushbutton_Print.enable( lPara )

Proc Fax_Button_OnClick

cRptName = trim(form.arnme[form.LB_reports.cursel])
?chooseprinter()
* _pdriver="winspool,ElectraSoft NT Print to Fax"
report form &cRptName. to printer

Proc Form_Close
_pDriver = form.cDriver
_pcopies = form.nCopies
_porientation = form.orientation

ENDCLASS

--------------030705030008030800020101--
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum