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.
Regards
Pushpraj
0
Comments
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.
Pushpraj
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.
My Blog - nav.education
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.
Regards
From this post:
http://www.mibuso.com/forum/viewtopic.php?f=23&t=21157
Or in the Actions option you can tell it to give you a pop up message.
see here:
http://www.BiloBeauty.com
http://www.autismspeaks.org