How to know whether Navision report is saved in pdf format
 
            
                
                    pushpraj1008                
                
                    Member Posts: 33                
            
                        
            
                    Hi,
I'm using PDF creator for saving navision report in PDF format through Navision Form.
I want to display a message with filename if the Navision report has saved in pdf format.
How would we know whether report is saved in PDF format or not.
                I'm using PDF creator for saving navision report in PDF format through Navision Form.
I want to display a message with filename if the Navision report has saved in pdf format.
How would we know whether report is saved in PDF format or not.
Regards
Pushpraj
Pushpraj
0                
            Comments
- 
            take a look into the folder where the pdf should createdDo you make it right, it works too!0
- 
            Hi,
 I want to know display a message whether report is saved in pdf format or not.
 Is any way in the from when it is report is running through report.runmodel.
 Below is the code:
 PDFCreatorOption := PDFCreator.cOptions;
 PDFCreatorOption.UseAutosave := 1;
 PDFCreatorOption.UseAutosaveDirectory := 1;
 PDFCreatorOption.AutosaveDirectory := FileDirectory;
 PDFCreatorOption.AutosaveFormat := 0; //PDF file, you can also save in other formats
 PDFCreatorOption.AutosaveFilename := FileName;
 PDFCreator.cOptions := PDFCreatorOption;
 PDFCreator.cClearCache();
 DefaultPrinter := PDFCreator.cDefaultPrinter;
 PDFCreator.cDefaultPrinter := 'PDFCreator';
 PDFCreator.cPrinterStop := FALSE;
 IF vInvoiceNo<>'' THEN BEGIN
 lRecSalesInvHead.SETRANGE(lRecSalesInvHead."No.",vInvoiceNo);
 REPORT.RUNMODAL(ReportID,FALSE,TRUE,lRecSalesInvHead);
 END ELSE
 REPORT.RUNMODAL(ReportID,BlnReqFrm,TRUE);
 IF Exits(FileDirectory+FileName+'.pdf' then
 MESSAGE('File %1 created',FileName);
 but this is not working. This code on "onPush' of button from a NAV Form.Regards
 Pushpraj0
- 
            Sometimes the file is not generated / not seen by the file system immediately after it is created. The code that checks to see if it exists will fail.
 Try putting the check in a loop with a timer. ie look for the file, if you don't find it, wait 1 second, check again. Do that for 5 checks or until it is found.0
- 
            Why do you not put the message in the report self in OnPostReport() :?:
 If you only need the message sometimes on special steps you create a function in the Report where you set a BoolVar if the message should displayed.
 The Report you declare as variable and runs this VariableReport.
 Read this LINK and there my post.
 There is an example.
 RegardsDo you make it right, it works too!0
- 
            Try something like// PDFFile var of type FILE Window.open('@1@@@@@@@@@'); REPEAT counter += 1; window.update(1,counter); UNTIL PDFFile.OPEN(PDFDir + '\' + PDFFile) OR (Counter > 10000);
 From this post:
 http://www.mibuso.com/forum/viewtopic.php?f=23&t=21157David Singleton0
- 
            Also on the PDF Creator Options you can check off autosave options - open pdf once created.
 Or in the Actions option you can tell it to give you a pop up message.
 see here: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
- 323 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



