Lebans ReportToPDF test

  • Thread starter Dieter Liessmann
  • Start date
D

Dieter Liessmann

Hi Stephen,

my OE would not post to the original thread, because he is too long!

So here the last results:

Stephen said:
Dieter can you help me isolate the problem.
Would you please export a Report to Snapshot file format and then
Email me the Snapshot.

... in progress
What happens when you use the MDE by itself and try to convert the
sample reports contained within the MDE?

exaytly the same error
"Das Format, in dem Sie das aktuelle Objekt auszugeben versuchen, ist nicht
verfügbar"
The Title of the MsgBox: ReportToPDF:2282
 
S

Stephen Lebans

Hi Dieter,
thanks for sending me the Snapshot file. I was able to find the problem. The
printer Driver you are using is not filling in the Devmode's PageWidth and
PageHeight values. I have only seen this in three specific instances:
1) Certain HP Printer Drivers
2) The Microsoft Office Document Image writer printer driver
3) A PDF printer driver

I am currently adding logic to handle this issue. A quick solution would be
for you to select a different printer driver than your current setup.

Thanks for helping me debug this issue. I will post the update later tonight
or early tomorrow. It's takes a bit of time as I have to translate the page
height and width values for all possible page sizes supported by Windows.

:)
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dieter Liessmann

Hi Stephen,

Stephen said:
Hi Dieter,
thanks for sending me the Snapshot file. I was able to find the
problem. The printer Driver you are using is not filling in the
Devmode's PageWidth and PageHeight values. I have only seen this in
three specific instances: 1) Certain HP Printer Drivers
2) The Microsoft Office Document Image writer printer driver
3) A PDF printer driver

I am using a
Kyocera Mita FS-3820N
I am currently adding logic to handle this issue. A quick solution
would be for you to select a different printer driver than your
current setup. Thanks for helping me debug this issue. I will post the
update later
tonight or early tomorrow. It's takes a bit of time as I have to
translate the page height and width values for all possible page
sizes supported by Windows.

It sounds good. Not the lot of work, but that there is a solution ;-).
I will wait for your solution because i think this problem could be happend
at my custumors.
 
S

Stephen Lebans

Hi Dieter,
I just posted the update to fix the issue you were encountering. Please let
me know how it works for you.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
R

Ron Weiner

Stephen

Hope you don't mind if I chime in here.

I got your A2000ReportToPDFver735.mde and tested it against my Problem
Printer Drivers. Here are my results testing against the
"DrawBoxWithMargin" report from your sample Database.

hp deskjet 895c series page size 0.38 x 0.39 in
HP LaserJet 1200 Series PCL 6 page size 13.17 x 17.06 in
hp photosmart 1115 series page size 13.17 x 17.06 in

Using other Drivers that I have installed (HP4, 5, 4050, and Color LaserJet
5/5m) I get the correct 8.5 x 11 in page size. Wish I had better news :-(
 
S

Stephen Lebans

Ron could I ask a favour? Would you export the DrawBoxWithMargin sample
Report to Snapshot with each of the 3 Printer Drivers from your post as the
default printer for your system or the SPecific printer for the report. I
would really appreciate your time here to get this bug resolved.
Email:
(e-mail address removed)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

Thank you very much Ron!
I found that certain printer drivers write nonsensical values into the
printer Devmode structure. I was testing for ZERO in the PageWidth and
PageHeight members. The Printer drivers you uses were writing the value of
90 into these members so my logic test failed as 90 could not simply be a
valid number. I have given up on using the PageWidth/Height members and
simply convert the PageSize member directly into the required values.

Thanks again! The update is now on my site. Version 1.95
http://www.lebans.com/reporttopdf.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Stephen Lebans said:
Ron could I ask a favour? Would you export the DrawBoxWithMargin sample
Report to Snapshot with each of the 3 Printer Drivers from your post as
the default printer for your system or the SPecific printer for the
report. I would really appreciate your time here to get this bug resolved.
Email:
(e-mail address removed)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dieter Liessmann

Hi Stephen,

good news!
It works!

I hope you will write Versions for A10 (XP) and A11 (2003)?!
 
D

Dieter Liessmann

Hi Stephen,

sorry, but i didn't have read the headline on your hompage until now.

It works fine with A2000 and A2002 but there always is a Problem with A2003.

The error is the one you aleready know:
"Das Format, in dem Sie das aktuelle Objekt auszugeben versuchen, ist nicht
verfügbar"
The Title of the MsgBox: ReportToPDF:2282
 
S

Stephen Lebans

Hi Deiter,
I was not able to test every single page size. What page size is your report
formatted for?

Can you export the report that is failing to Snapshot format and Email me
the Snapshot please.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dieter Liessmann

Hi Stephen,
Stephen said:
I was not able to test every single page size. What page size is your
report formatted for?

German DIN-A4 Letter
Can you export the report that is failing to Snapshot format and
Email me the Snapshot please.

.... in progress
 
S

Stephen Lebans

Dieter the Snapshot file you sent me converted without any problems. What
happens when you use ReportToPDF to convert the Snapshot file itself, not
the original report?
The error message is not from my source code but from Access itself. If I
translate it correctly, it is saying the report you selected is not
available to be exported to Snapshot format. Did you produce the exported
Snapshot in A2003 or another version of Access.

Do you have a default printer driver selected for the machine that has
Access 2003 on it? If so then use Page Setup to select a specific printer
driver for the report in A2003.

Honestly Dieter, at this point, I really do n ot belive it is a problem with
my code but a problem with your setup in A2003.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dieter Liessmann

Hi Stephen,

Stephen said:
Dieter the Snapshot file you sent me converted without any problems.
What happens when you use ReportToPDF to convert the Snapshot file
itself, not the original report?

Works fine?!
The error message is not from my source code but from Access itself.
If I translate it correctly, it is saying the report you selected is
not available to be exported to Snapshot format. Did you produce the
exported Snapshot in A2003 or another version of Access.
A2003

Do you have a default printer driver selected for the machine that has
Access 2003 on it?
Yes

If so then use Page Setup to select a specific
printer driver for the report in A2003.

same error as before :-(
Honestly Dieter, at this point, I really do n ot belive it is a
problem with my code but a problem with your setup in A2003.

sorry, but i can't belive this, becaus i have tested on 2 different
machienes.

I will make a few more tests on other machienes on monday.
 
S

Stephen Lebans

Dieter do the sample reports in the ReportToPDF MDE convert OK?

I have 2 machines with A2003/WinXP Pro and your file converted fine.

Just to get things straight, when I asked you if you were able to convert
the exported SNapshot file you sent me you said:
Works fine?!
Does that mean the Snapshot converted properly?


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dieter Liessmann

Hi Stephen,
Stephen said:
Dieter do the sample reports in the ReportToPDF MDE convert OK?

No. I still get the same Message when i try the reoprts in your mde.
I have 2 machines with A2003/WinXP Pro and your file converted fine.

Just to get things straight, when I asked you if you were able to
convert the exported SNapshot file you sent me you said:
Does that mean the Snapshot converted properly?

Yes!
Sorry for my confusing "?!".
I placed it because I don't understand why I can manually export a report to
snp an then convert it into pdf, but not automatically.
 
D

Dieter Liessmann

Hi Stephen,

i have made a few more tests and solved the problem!

To my shame it's a servicepack problem.
On my systems there was only SP1 for O2003 installed. Now i have installed
SP2 an int works!

Sorry for all the work because of my stupid beginnersmistake.
 
S

Stephen Lebans

Dieter I really appreciate that you stuck with this issue until it was
resolved. I'll post your findings on the ReportToPDF Web page. I'm sure you
will help the next person who runs into this issue.
:)
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

Posted a new and improved version of the ReportToPDF project tonight.
http://www.lebans.com/reporttopdf.htm

Major change to project. No more MDE! Core logic is now contained within a
standard Windows DLL named StrStorage.dll produced in C++. New version of
the DynaPDF library. Neither the DyanPDF DLL or the StrStorage DLL require
Registration or a Reference to be set in your MDB. Solution now works with
all versions of Access. Several minor bug fixes and huge increase in
execution speed.


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
R

Ron Weiner

Never fails! Two days after I deploy there is a new version. :)

Stephen thanks again for the generous contributions of your time and
expertise to the Access developer community. I haven't tested the new
version, but this is exactly what we have needed in Access for quite some
time. I had gotten tired of telling my customers that they needed to buy a
PDF maker or download a freeware solution and then install it on every PC
that used my app. Then having to fight with code that could work using a
zillion different PDF creators in various version levels. It was a
nightmare!!

I am on a different project now, but you can be sure that the next time that
I need PDF output from Access, or when we upgrade my last project I will be
using your solution.

As an aside can you point me to where I might be able to get additional
information on the Enhanced Metafile format, and how I might be able to
create them from other applications like Word, Excel, VB, etc. Just
wondering out loud ;-} Always need to be willing to look at new ways to get
things done, and be ambidextrous in this business to survive.
 
S

Stephen Lebans

Hi Ron,
If your idea is to use the ReportToPDF solution for other applications then
I am afraid it its simply not possible. The key here is the Snapshot format.
In a nutshell, it is similiar to the output of your printer driver Spool
files. In order to simlulate this with other applications, you would have to
either:

1) Using Win2K or higher, enable saving of the printer spooler files.
or
2) Purchase and install an EMF Printer driver.

ReportToPDF was written for Access only.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Ron Weiner said:
Never fails! Two days after I deploy there is a new version. :)

Stephen thanks again for the generous contributions of your time and
expertise to the Access developer community. I haven't tested the new
version, but this is exactly what we have needed in Access for quite some
time. I had gotten tired of telling my customers that they needed to buy
a
PDF maker or download a freeware solution and then install it on every PC
that used my app. Then having to fight with code that could work using a
zillion different PDF creators in various version levels. It was a
nightmare!!

I am on a different project now, but you can be sure that the next time
that
I need PDF output from Access, or when we upgrade my last project I will
be
using your solution.

As an aside can you point me to where I might be able to get additional
information on the Enhanced Metafile format, and how I might be able to
create them from other applications like Word, Excel, VB, etc. Just
wondering out loud ;-} Always need to be willing to look at new ways to
get
things done, and be ambidextrous in this business to survive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top