Perhaps you may have inquired the possibility of executing an external program within Dynamics NAV due to many reasons such as;
1. To run an external application like Windows Calendar or Skype within NAV
2. To run a Crystal Report using a Icon available in NAV
Whatever the reason, concept for making this a reality would be as follows;
Initially you may have to find out the directory path where the executable file of the external application is located. For example, let's assume that you are in need of calling the windows Calendar within Payment Journal Screen. You can search the calc.exe file where it is located. Mostly this is available in the windows System32 directory. Therefore the relevant directory path could be defined as 'C:\WINDOWS\system32\calc.exe'. In CAL, you could call the Calendar Control by giving the following command;
SHELL('C:\WINDOWS\system32\calc.exe');
This can be achieved by placing an additional command button in the Payment Journal Screen. In the 'OnPush' trigger, once you place the following CAL code you can display the Windows Calendar on top of the Payment Journal Screen.
For example, if you want to direct your browser to open a particular Web Site, for example www.microsoft.com you can do it by placing the following command;
HYPERLINK('http://www.microsoft.com');
Let's say if you want to open a PDF document you could do it by giving the following command in CAL;
HYPERLINK('D:\MyDocuments\80042A_00.pdf');
In the above case, D:\MyDocuments\ is the directory path where the relevant PDF file is located and the 80042A_00.pdf' is the PDF file name.
For instance, if you want to call an External Program using the Menu Structure, you will be able to do it by giving a reference to Code Unit in the relevant Menu Object; in the 'OnRun' trigger of the Code unit you can place you CAL commands to call the external application as explained above.
1. To run an external application like Windows Calendar or Skype within NAV
2. To run a Crystal Report using a Icon available in NAV
Whatever the reason, concept for making this a reality would be as follows;
Initially you may have to find out the directory path where the executable file of the external application is located. For example, let's assume that you are in need of calling the windows Calendar within Payment Journal Screen. You can search the calc.exe file where it is located. Mostly this is available in the windows System32 directory. Therefore the relevant directory path could be defined as 'C:\WINDOWS\system32\calc.exe'. In CAL, you could call the Calendar Control by giving the following command;
SHELL('C:\WINDOWS\system32\calc.exe');
This can be achieved by placing an additional command button in the Payment Journal Screen. In the 'OnPush' trigger, once you place the following CAL code you can display the Windows Calendar on top of the Payment Journal Screen.
For example, if you want to direct your browser to open a particular Web Site, for example www.microsoft.com you can do it by placing the following command;
HYPERLINK('http://www.microsoft.com');
Let's say if you want to open a PDF document you could do it by giving the following command in CAL;
HYPERLINK('D:\MyDocuments\80042A_00.pdf');
In the above case, D:\MyDocuments\ is the directory path where the relevant PDF file is located and the 80042A_00.pdf' is the PDF file name.
For instance, if you want to call an External Program using the Menu Structure, you will be able to do it by giving a reference to Code Unit in the relevant Menu Object; in the 'OnRun' trigger of the Code unit you can place you CAL commands to call the external application as explained above.
Hi this is great site and go ahead with vast experiance,
ReplyDeleteI have a problem. Can you release more tropic on RTC reports......
AS a starting point lets talk about this issue.
My Invoice in RTC have two or more pages and it is in tabular format(only column no horizontal line for each line items in the invoice.
when it prints last line in Ist page I want to have horizontal line next to that to show the table is close.But currently my table is open for all the pages except last page.
how can I do it?
Hewa
Hi Hewa,
ReplyDeleteThanks for your feedback, however I am not that clear about your query.Could you please further explain about the expected functionality of the report.
Prem