How to save Navision Reports as PDF
Comments
-
Dear all,
Does anyone can tell me how to import and compile the ara3n's code?
Create it a codeUnit or? :-s
thanks0 -
create a text file. Copy and paste the code into it. and then import the txt file into navision.0
-
then it would become a Form 50100 ?
thank you0 -
Hello ara3n,
When I compiled it, it showed me a error as [You connot enter 'Item List' in ReportNo.]
Then the cursor jump to OnOpenForm() trigger where have a statement is
ReportID := REPORT::"Item List";
Did I have do anything wrong? :?: or do you have a report call "Item List"? then I need to change to any of mine?
thank you.
Then I cannot find the Form property soureTable is empty... is it right?
thank you.0 -
Yes there is no source table for the report, and yes you can change the report to anyy of your report.0
-
gison wrote:then it would become a Form 50100 ?
thank you
You can change that to a different ID based on your license.0 -
0
-
Hi ara3n,
sorry...could i ask you ...what are the PDFCreator:eReady() and PDFCreator::eError? They look like function, but I cannot find it in C/AL Globals functions Form.... :?0 -
Those are events.
in the global variable, when you declare the variable to the automation, you can click on property and you'll see a property called WithEvents if you set it to yes, it will show the event triggers in navision where you can put code to do certain things in an event.0 -
Thanks for your patience.
You really help me a lot.0 -
Hi ara3n,
I tried to change the statement "REPORT.RUNMODAL(ReportID,TRUE,TRUE)"
which mean we can launch report with request window, but the pdf couldn't be generated. Is't always have this limitation or did I lose something?
thank you.0 -
If you want to generate a pdf. you can run the report and select the pdf creator printer. No need for any code.
This code automates the process. So that you can create many pdf documents.0 -
appreciate your help.
0 -
Thank you very much man! you save me, I was looking for this, I had to create a pdf with several invoices and I didn't know how. I can do it with your code.. Thanks again!0
-
You are welcome.0
-
Hi,
How can i use the password mode of PDFCreator in Navision? I add this lines but the pdf file is not created...... PDFCreatorOption.UseAutosave := 1; PDFCreatorOption.UseAutosaveDirectory := 1; PDFCreatorOption.AutosaveDirectory := FileDirectory; PDFCreatorOption.AutosaveFormat := 0; //PDF file, you can also save in other formats PDFCreatorOption.AutosaveFilename := FileName; //TEST PASSWORD PDFCreatorOption.PDFUseSecurity :=1; PDFCreatorOption.PDFEncryptor := 1; PDFCreatorOption.PDFLowEncryption := 1; PDFCreatorOption.PDFUserPass := 1; PDFCreatorOption.PDFUserPasswordString := 'test'; //TEST PASSWORD PDFCreator.cOptions := PDFCreatorOption; PDFCreator.cClearCache(); DefaultPrinter := PDFCreator.cDefaultPrinter; PDFCreator.cDefaultPrinter := 'PDFCreator'; PDFCreator.cPrinterStop := FALSE; REPORT.RUNMODAL(ReportID,FALSE,TRUE);
0 -
Change the code to something like this.
//TEST PASSWORD PDFCreatorOption.PDFUseSecurity :=1; PDFCreatorOption.PDFOwnerPass := 1; PDFCreatorOption.PDFOwnerPasswordString := 'MasterPass'; PDFCreatorOption.PDFDisallowCopy := 1; PDFCreatorOption.PDFDisallowModifyContents := 1; PDFCreatorOption.PDFDisallowPrinting := 1; PDFCreatorOption.PDFUserPass := 1; PDFCreatorOption.PDFUserPasswordString := 'UserPass'; PDFCreatorOption.PDFHighEncryption := 1; //TEST PASSWORD
0 -
Tks for the help, the code works perfect.0
-
dfragoso wrote:Tks for the help, the code works perfect.
You are welcome.0 -
Hi,
i'm trying to run this example, but when i imported the object and tried to compil it, i got this error : " you can't write "Item list" in ReportNo. and the cursor was leaded to the code which is in the "OnOpenForm" Part ...
can u help please ? ](*,)0 -
you don't have an "Item List" Report? PIck a different report to test.0
-
Nizarz wrote:Hi,
i'm trying to run this example, but when i imported the object and tried to compil it, i got this error : " you can't write "Item list" in ReportNo. and the cursor was leaded to the code which is in the "OnOpenForm" Part ...
can u help please ? ](*,)
change this line
ReportID := REPORT::"Item List";
to
ReportID := REPORT::"Customer - Labels";
or to another report you want to print.0 -
I would like to vote this as
"Most useful thread ever on MiBuSo"
Thanks Rashed, I know its simple and I know anyone could do it, but YOU DID IT, thanks for sharing this, I am sure that collectively you have saved the community hundreds of hours messing about to solve all these silly issues.
You should save it as a Download some how (even just as a text file of the source) so that we can vote for it. I am sure it would win the next "Best Down Load" Competition.
It also serves as a great example of how something so simple can be so useful in NAV, a great lesson for all the newbies out there.
=D>David Singleton0 -
Oh an d the reason I was actually here....
Has anyone else come across the error where PDF objects created in ver. 0.9.3 won't run on 0.9.5 and vica versa. Basically the comand below will only run on a coumputer running the same version of PDFCreator that it ws complied with.
The issue is the commandPDFCreatorOption := PDFCreator.cOptions;
Which gives the message:This message is fo C/AL programmers:
Invalid assignment. It is not possible to assign a _clsPDFCreatorOptions to a clsPDFCreatorOptions.
Its clearly an issue with wich dll you have registered, and I am pretty sure its a PDF creator issue, not a NAV issue.
Its damn anoying having to use a different computer to compile objects to get this to work, and worst is when a client has computers with differnt version of PDF creator installed.
Has anyone solved this?David Singleton0 -
Waldo wrote:Anyone knows if PDFCreator works on Vista already?
Can't find it in the forums ...
?? ?Vista??? Whats that? =;David Singleton0 -
Hi all,
i'm using already cute pdf for editing my reports in PDF format, but i want to send them in this format via Navision ... anyone can help please ](*,) ... Thnaks0 -
Nizarz wrote:Hi all,
i'm using already cute pdf for editing my reports in PDF format, but i want to send them in this format via Navision ... anyone can help please ](*,) ... Thnaks
If you are editing your documents in Cute pdf, navision can't open the pdf document.
You need to modify or create a Navision report that you can the print to PDF.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions