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:
00384130
Views:
37
Hi Houston,

>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"

I never tried this class before, so may be it's a good time to start. I'll give your idea a shot on Monday and inform you about results.

>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 )

  <strong> mod(_pageno,2)<>0 </strong>

>         *- 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().
>
As far as I understand your idea, it would work only, then file is actually printed on the printer. Am I right?

I have another idea, which I would test on Monday. In Group Footer put a really big field, like replicate(space(200),45) (This report Page setting is landscape). In Print When expression put mod)_pageno,2)>0 and remove line if blank.

Hopefully, this idea would work. Otherwise I'll try your idea.

Thanks a lot.
>
>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform