Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outputting report in .PDF with Acrobat 4
Message
 
To
17/06/1999 10:48:27
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00228100
Message ID:
00231244
Views:
21
>
>After several hours of trial and error, and more than a few blind alleys, I discovered the problem. The reason for my report snafu was.....I was using the wrong kind of macro substitution.
>
>If you look at the code I posted, the report was actually being called with the line:
>REPORT FORM (tcLayoutName) NOCONSOLE TO (lcOutputFile)
>
>After all else failed, I took a look at this line and wondered "What if I used the ampersand substitution instead?" I went ahead and changed the line to:
>REPORT FORM (tcLayoutName) NOCONSOLE TO &lcOutputFile.
>
>PERFECT! It worked right the first time out, with no additional monkeying around with stripping off the .PDF or trying to detect which version of Acrobat I was using. I did some regression testing, and it works perfectly with Acrobat 3.01 and 3.02 as well.
>
>After spending over 12 hours futzing around with the output file string, trying to write code to handle each version of Acrobat, and tearing my hair out with frustration, this fix that took 5 minutes to code and test turned out to be the solution. Let this be a lesson: when all else fails, go back to basics.
>
>Bill

I am glad you got it working.

I did not suggest the "&" macro substitution because () are often better. Try a directory change with a long file name containing spaces and you'll see what I mean...

Another thing that was there in Adobe 3 and is still there in 4 is that it can change your default directory without notice in the case you have it prompt you for a PDF filename and you change directories there. So better save your defaults before printing a PDF and restore them after.

José
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform