28. november 2007 - 09:57Der er
25 kommentarer og 1 løsning
Skapa PDF av Rapport
Jag anvænder Lebans løsning før att konvertera rapporter till PDF. På min pc har jag Acrobat Professional och skulle dærfør inte behøva Lebans løsning. Den db som jag gjort anvænds också av andra och jag har lagt in Lebans løsning før att det skall vara møjligt att skapa PDF utan att ha Acrobat installerad. Jag får det inte att fungera på dator som bara har Acrobat Reader installerad. Jag har nu testat Lebans exempeldb med A2000SnapshotToPDF ver 751 på dator utan Acrobat och funktionen fungerar inte. Jag får felmeddelande: Det format du førsøker exportera det aktuella objektet till ær inte tillgængligt. Ær inte hela meningen med løsningen att jag inte skall behøva ha Acrobat installerad? Tacksam før hjælp!
I might ad that both the dll files are in the same location as the db. I have Vista Business and Office 2007 on one pc and there it works when I'm running the db in Access 2007, but not when I'm running it in Access2003 runtime mod. I have one pc with XP and Office 2003 and there it works both when I'm running the db in runtime and full mode. A third pc has Vista and Access 2003 and there it does'nt work. The first and the second pc has Acrobat Professional but not the third.
Can you give me a link to Lebans homepage where I can read about the snapshot to PDF converter? I'm interested in read the requirements etc.
Normally you need a program which can create a PDF document and as far as I know Acrobat reader cant. I think Acrobat Proffesional includes somethink called Distiller which creates the PDF documents. So if Lebans converter doesnt include a PDF creater than I think you will need to use Acrobat Prof.
"You can use the A2Kversion with A2000, A2002 and A2003. It can also be converted to A97. Please view the form named README before launching the converter.
A2000ReportToPDF is an Access 2000 database containing a function to convert Reports and Snapshot files to PDF documents. No PDF Printer driver is required. This archive contains a new version of the DynaPDF library and the StrStorage library. Please make sure you delete your old version, especially if you copied them into your Windows\System folder."
What is the point with the Lebans solotion if Acrobat Prof. is still needed?
What I can't figur out is why, as mentioned earlier, it works on my first pc botht as runtime and full mode, but on the second it only works when running Access 2007 but not in Access 2003 runtime.
I have found out that it has something to do with the installation package I'm creating. The developer extention I have for Access 2003 does something during the packaging. If I install my db on a clean pc together with the runtime for Access 2003, it does'nt work. If I then install another version of Access 2003 runtime and directly uninstall it, the Lebans solution works. Strange???
Yes I can, so it has to do with some other part of my runtime that is updated when I'm installing the second version. When I'm uninstalling it, it leaves the updated file since it is used by another program, i.e. my runtime. I could easiely leave my runtime and include the one that works, but it has the English language and I want to keep it Swedish. A solution is to use the Access 2007 runtime, but Access 2007 db engine does not work as good as 2003.
I was away during yesterday but now I have done the test. The result is the same. I get the same error msg. What puzzels me is that I had the function in my db to E-mail a report as snapshot and this works. Why does'nt Your test and Lebans solution work? The reason why I want to be able to create PDF within my db is to be able to mail reports from it. To mail snapshots works if the reciever has Snapshot Viewer, so I would prefere sending PDF. Lebans solution is exelent if I can make it work and even better if the report is E-mailed as PDF in the same automated way as snapshot. That would be worth another 100 points.
Synes godt om
Slettet bruger
30. november 2007 - 14:26#17
Hvorfor ikke den simple måde? Installér PDF995 eller CutePDF - det kan hentes gratis på nettet. Udskriv rapporten til PDF-printeren
CutePDF is ok, but the optimal is to be able to, by automation, send the report as PDF and as an attatchment to an e-mail. Just as if the the user of my db had Acrobat Prof.
Just found this on the web (in German) It actually refres to Lebans PDF converter, so I think we may have found the problem. (Hope so)
Korrektur bei snp-konvertierung docmd.outputto Wer das sehr gute Tool ConvertReportToPDF von Stefan Lebans in Access nutzt, um automatisch pdfs zu erzeugen, dem kann es passieren, dass manchmal der Code an einigen Rechnern einen Fehler erzeugt. Die Ursache liegt darin, dass der Ausgabeparameter nicht auf allen Rechnern eindeutig initialisiert ist. Ich hab deshalb die Routine einfach doppelt laufen lassen, nach dem Prinzip, wenn nicht eins, dann nimm zwei.
Hier die Korrektur im Modul: ' Export the selected Report to SnapShot format 'Optimierung Raimund: format anpassen On Error Resume Next DoCmd.OutputTo acOutputReport, RptName, 'Snapshot-Format (*.snp)', strPathandFileName 'Optimierung Raimund..wieder regulärer verlauf If Err.Number = 2282 Then ''SnapshotFormat(*.snp)' On Error GoTo ERR_CREATSNAP DoCmd.OutputTo acOutputReport, RptName, 'SnapshotFormat(*.snp)', strPathandFileName End If On Error GoTo ERR_CREATSNAP
Lebans solution has 3 different functions, make snapshot from a report, make PDF from a report and last, make PDF from a snapshot. The German thing has to do with making snapshot from a report. As I understand, when making PDF from a report it first creates a snapshot and then converts it to a PDF.
As I have said earlier I had the function to E-mail a report as snapshot using the following command: DoCmd.SendObject acReport, stDocName, "Snapshot Format",,,,"Attatchment file name" and there is no problem in creating this snapshot to send. That is why I can't figur out why Lebans solution does'nt work when it is included in the runtime version of Access 2003, when send as E-mail does? The reason I want to send reports as PDF instead of snapshot is that it is mutch simplier for the reciever since allmost evryone has Acrobat Reader.
I have no idea why it deosnt work but I can see that there is a problem in how the report type is given.
In the code 30/11-2007 19:28:53 it takes into acount two ways of giving it but you use a third. ("Snapshot Format") So you should maybe try this way in Lebans code.
Hi Terry! To busy with everything, but now I tryed Your suggestion. How blind one can be! Now it works. I had the solution myselve but could'nt see it. Thank You, well wort the points.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.