How can i Automate Report Generation and save as an excel sheet.

I found how to automate the report generation but i am not able to find the option to save as Excel…Need helping hands!!!

Cheers!!!

Hi,

I want to get your help to get to know about this:

If we run the report in windows dynamics NAV, There is option to print to excel, and the report will be printed to excel when the process is done. I want the optput to get automatically saved as well to a particular specified location. If anyone knows abt this?

I want the developers help before moving forward!!!

Cheers!!!

Hi,

I want to get your help to get to know about this:

If we run the report in windows dynamics NAV, There is option to print to excel, and the report will be printed to excel when the process is done. I want the optput to get automatically saved as well to a particular specified location. If anyone knows abt this?

I want the developers help before moving forward!!!

Cheers!!!

Quick Reply

Can anyone guide me to user the SQL Server agent.

I want to make a report and save it in a particular location through Microsoft SQL Server 2005.

Guidance will be appreciable!!!

Do we need to code in C/AL for this? or is der any option in dynamics NAV 2009?

Have you seen SAVEASEXCEL Function (REPORT)?


I have seen that. But itz not working for me. Can u sent me the code plz.

I know abt the microsoft SQL Server Agent, But my doubt is how can i save the report to excel format by using jobs ?

is the code like dis: CurrReport.SAVEASEXCEL(“Location”) ???

or is der any option without coding in report?

I am not able to paste the code from help…check it in help file.

i saw the code in help. Iam confused where to paste that code.

Let as assume we are making a report of ID 120, Aged Account Receivable.

If i go to the C/AL Code in that, Where should i paste the SAVEASEXCEL Command?

OnPost Report trigger

I pasted like this in the POST Report Trigger : CurrReport.SAVEASEXCEL(‘H:\Report’);

Is the file name means the path name?

Iam confused dear…

Can u copy and paste it over here…!!! iam doing it for Aged Account Receivable Report … Report ID is 120…Can u please copy and past the code that you put in that over here…plzz

and tell me if we need to change anything anywhere in other part of the code.

Thanks alot for your replys…!!!

Report - OnPostReport()
IF PrintToExcel THEN

CreateExcelbook;
CurrReport.SAVEASEXCEL(‘H:\Report’);

i put it like this. !!! Is that correct???

http://msdn.microsoft.com/en-us/library/dd355202.aspx

It says “FileName”, thus of course it’s not only the path:

FileName

Type: Text

The path to and the name of the file that you want to save the report as.

Maybe you should also check out this one:

http://dynamicsuser.net/blogs/mark_brummel/archive/2010/09/13/rtc-excel-buffer-vs-currreport-saveasexcel.aspx

But you can use this function from RTC which has RDLC data only… [:(]

What code should i put inside the post Record Trigger in the Aged Account Receivable (ID 120), To save the document as Excel? Actually iam confused…Do i need to change anything else.?

Wen we take the report of account receivable, it prints to an excel sheet, it doent save automatically to a location. I want a solution to save automatically to a specified location.

Cheers!!!

Iam Not using the Role Tailored Client. Iam Using Windows NAV / Navision 2009

Then SaveAsEXcel doesn’t work in your case…