Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing odd / even
Message
From
22/04/2009 05:20:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Printing odd / even
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01395867
Message ID:
01395867
Views:
174
Hi,

I would like to print the odd / even pages and found a coding doing so however one drawback, the unwanted pages come out as a blank page.
Is there a logic to suppress the blank page?

code I have found:
Parameters tcReport, tcOddEven
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 (home()+"ffc\_reportlistener.vcx")

  icWhatToPrint=Upper(tcOddEven)
  
  procedure Render
  lparameters tnFRXRecNo,tnLeft,tnTop,tnWidth,tnHeight,;
  tnObjectContinuationType,tcContentsToBeRendered,toGDIPlusImage
    if this.PageNo%2=1 and this.icWhatToPrint="EVEN"
      nodefault
      return
    endif
    if this.PageNo%2=0 and this.icWhatToPrint="ODD"
      nodefault
      return
    endif
  endproc

enddefine
Thanks for replying,

Koen
Next
Reply
Map
View

Click here to load this message in the networking platform