Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print the paper of 2 sides
Message
From
02/08/2010 02:40:29
 
 
To
01/08/2010 14:34:34
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01474796
Message ID:
01474834
Views:
42
thank you very much for help and code,

but i have no idea how i can use it at myform via command button,

Pl,s if you can help me to do it as steps.

thanks

>>hi all,
>>
>>
>>i want the printer to print the paper of 2 sides on A4 size via title band or sutable way
>>
>>the table have
>>field 1 type memo&&have characters fill the a4 page(as a contract) side 1
>>field 2 type memo&&have characters fill the a4 page......................side2
>>
>>thanks
>
>Hi,
>
>when you are using Reportbehavior 90 you could consider to make use of following function:
>
>
>* PrintOddEven
>Parameters tcReport, tcOddEven
>Select curReport
>
>Go Top
>Set ReportBehavior 90
>
>loOddEvenListener = Newobject("OddEvenListener")
>loOddEvenListener.ListenerType	= 1   &&Preview
>loOddEvenListener.icWhatToPrint = Upper(tcOddEven)
>
>Report Form (tcReport) Object loOddEvenListener
>
>Define Class OddEvenListener As UpdateListener Of "_reportlistener.vcx"
>
>	icWhatToPrint = Upper(tcOddEven)
>
>	Function IncludePageInOutput
>		Lparameters tnPageNo
>		Do Case
>			Case tcOddEven = "ALL"
>				Return .T.
>			Othe
>				Return (tnPageNo%2=1 And This.icWhatToPrint = "EVEN") Or (tnPageNo%2 = 0 And This.icWhatToPrint="ODD")
>		Endcase
>Enddefine
>
>
>And in your printing class, when calling your report you should have:
>
>
>** your form had a property chkOddEven  default .t.
>lcReport = "YourReport.frx"     &&& change to your report or call  it via a parameter your option
>	
>	thisform.PrepareCurreport(lnReportSelect)  ** or what ever to prepare your cursor for the report.
>		if this.parent.chkOddEven.value = .t.
>				
>			lcMessage = "Print odd - pages"
>			lcMessageCaption = "Make choice"
>			lnAnswer = messagebox( lcMessage, 3+32+0+0, lcMessageCaption, 0 )  &&  Yes = 6, No = 7
>			do case
>				case lnAnswer = 2 && Cancel
>				case inlist(lnAnswer, 6, 7)
>					llRet = .t.
>			endcase
>
>			lcMessageCaption = "Please insert paper again"
>
>			do case
>
>				case  llRet = .t. and lnAnswer = 6
>
>					lcChoice = "ODD"
>					do printoddeven with lcReport, lcChoice
>
>					lcPages = alltrim(transform(_pagetotal))
>					lcMessage = "Odd pages printed ?"+chr(9)+chr(13)+"(total "+lcPages+" pages )"
>
>					lnReady = messagebox( lcMessage, 3+32+0+0, lcMessageCaption, 0 )  &&  Yes = 6, No = 7
>					if lnReady = 6
>						lcChoice = "EVEN"
>					endif
>
>				case llRet = .t. and lnAnswer = 7
>					lcChoice = "EVEN"
>					do printoddeven with lcReport, lcChoice
>					lcMessage = "Even pages printed ?"
>					lnReady = messagebox( lcMessage, 3+32+0+0, lcMessageCaption, 0 )  &&  Yes = 6, No = 7
>					if lnReady = 6
>						lcChoice = "ODD"
>					endif
>				case lnAnswer = 2
>			endcase
>		else
>			lcChoice = "ALL"
>
>			do printoddeven with lcReport, lcChoice
>		endif
>
>
>Now user have the option to start with odd or even pages and finish after turning the paper around with even or odd pages
>
>Please report back if you face any difficulties with this.
>
>Regards,
>
>Koen
Previous
Reply
Map
View

Click here to load this message in the networking platform