Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Output to PDF file by default
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00379403
Message ID:
00384081
Views:
31
Hi Nadya,

Part 1.
I only have Acrobat version 3.0 - the Distiller part has some compression settings under "Job Options", but these only relate to the type and degree of image compression (selected from a pull-down list). However I noticed that these settings are stored in the Registry under:

HKEY_CURRENT_USER\Software\Adobe\Acrobat\AcroDist\JobOptions\

You might find that version 4.0 is also storing it's settings in a similar place - if so, then accessing these values and updating them programmatically is quite easy. Look at

"C:\Program Files\Microsoft Visual Studio\Msdn98\98VSa\1033\Samples\VFP98\Classes\Registry.Prg"

Part 2.
Getting the report to do an extra page eject if the last page is odd numbered looks more challenging. I have had limited success at this. I can get two pages but not one !!

This may also not be the solution that you are looking for - but here is how I did it. Either in your most outer grouping or on a dummy data grouping add the name of a function to the 'Run expression, On Exit' text box
Example - MyExitFooter().

In your controlling program (or procedure file), etc. add something similar to the following:
***********************
FUNCTION MyExitFooter()
***********************
   IF tStart = {01/06/2000 08:15}
      *- Last record has now been processed.
      IF _PageNo / 2 # INT( _PageNo / 2 )
         *- last page number is odd.
         EJECT     && PAGE
         SET PRINTER TO   && (NT4 & VFP6) Ends print spooling and should cause printing to start.
      ENDIF
   ENDIF
   RETURN .T.
   ENDFUNC  && MyExitFooter().
In my test tStart is a field that contains unique values and the hard-coded value above correpsonds to the value of the last record (that is - the one that will appear right at the end of the report), you would obviously need to determine this programmatically before running the report and actually use a variable.

One of the limitations is that the last pages are blank. At the moment I can only think of a brute force way to get page headers and other information onto the last page - that is : do a skip -1 and add a 'print when' to all of your reports data fields!

One day I hope to have version 4 of Acrobat and then maybe I will become a little more useful.
Houston.
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform