Hi…
I need to create a report and export the same in excel file.
Anybody knows??? jst let me knw the steps and code…
Hi…
I need to create a report and export the same in excel file.
Anybody knows??? jst let me knw the steps and code…
As someone replied on your post on Mibuso, search the forums. This has literally been discussed hundreds of times.
Thanks[:^)] but i am looking for the steps…
You’re not going to get someone to tell you step by step
Do this
Do that
It’s not a trivial process to add all of the code and what you have to do depends on your report. There is no How To guide.
Your job is to figure out what to do. Part of being a developer is learning to do things on your own. Again, search the forums. You’ll find information about the Excel Buffer table and reports in the base software that you can look at (Aged Accounts Receivable).
hey, i know how you feel, 'm a beginer too:)
Create the Report Data Model,
In the Object Designer’s Report List, click the New button. The New
Report window opens. In this demonstration, do not use the Report
Wizard.
Select Create a Blank Report and then click the OK button. The
Report Designer opens.
Click the first empty line in the Report Designer, and type or select
the number or name of table 13, Salesperson/Purchaser in the
DataItem column. By the default, the Name column is set to the table
name.
Click the next line, and add the table 18, Customer.
While the Customer data item is still selected, click the right arrow
button at the bottom of the Report Designer to indent the Customer
data item.
Open the Properties window for the Customer data item.
Locate the DataItemLinkReference property, and verify that it is set
to Salesperson/Purchaser.
Locate the DataItemLink property and click the Assist-Edit button
on the DataItemLink property. The DataItem Link window opens.
Type the following in the DataItem Link window:
Field Reference Field
SalespersonCode Code
go to design press alt+v+n and degisn it accordingly
this way you will learn it easyly:) you can also create it by using the report wizard:)
To send to excel, press alt+f +d:)
hi,
check out the Excel Buffer table in designer, there are all of function what are need for you!
a
Yes. I know how to do that.
Look through the Report objects in the standard Navision system until you find one that does a job like the one you want to complete. In Object Designer apply a Field FIlter to Name Field like Excel.
You should see a list of Report Objects.
Browse through a selection of the objects to undertand the source data and how the data is exported; then copy the functions of the report into a new report.
It’s not so difficult.
Good luck.
[:)]
Hi Arnav,
you can follow these steps in order to create the report
Go to Object Designer’s Report List, click the New button. The New
Report window opens.
Select Create a Blank Report .
Click the first empty line in the Report Designer, and type or select
the number or name of table By the default, the Name column is set to the table
name.
Click the next line, and add the table 18, Customer.
While the Customer data item is still selected, click the right arrow
button at the bottom of the Report Designer to indent the Customer
data item.
Open the Properties window for the Customer data item.
Locate the DataItemLinkReference property, and verify that it is set
to Salesperson/Purchaser.
Locate the DataItemLink property and click the Assist-Edit button
on the DataItemLink property. The DataItem Link window opens.
Type the following in the DataItem Link window:
Field Reference Field
SalespersonCode Code
go to design press alt+v+n and degisn it accordingly
this way you will learn it easyly:) you can also create it by using the report wizard:)
To send to excel, press alt+f +d:) . if you have any queries please free to contact me at kgulati@paragyte.com.
Thanks,
Kamal Gulati,
Paragyte technologies
web- www.paragyte.com
Hi Its not an risky one.I Ill just show you the basic steps.it ill export all the customer to Excel.
for this you need to create some automation variables
Variales you need
Name Data Type SubType
1.Excel Automation ‘Microsoft Excel 12.0 Object Library’.Application
2.Book Automation ‘Microsoft Excel 12.0 Object Library’.Workbook
3.Range Automation ‘Microsoft Excel 12.0 Object Library’.Range
4.Sheet Automation ‘Microsoft Excel 12.0 Object Library’.Worksheet
5.I Integer
6.J Integer
Now place the following code at respective triggers
OnPreDataItem() {To Create work sheet}
CREATE(Excel);
Excel.Visible(TRUE);
Book:=Excel.Workbooks.Add(-4167);
Sheet:=Excel.ActiveSheet;
Sheet.Name := ‘Customer List’;
OnAfterGetRecord() {To assign Values to the excel cells}
Sheet.Range(‘A’+j).Value := Customer.“No.”;
Sheet.Range(‘B’+j).Value := Customer.Name;
j:=INCSTR(j);
OnInitReport();
j:=‘1’;
Now Design your report and run.Thanks
Jerome Marshal.J
Thank you so much Marshall.[:D] , that’s what I m looking for…
Hi Shona
By presing Alt + F+D also Export the data to excel file.But it can sends from forms to excel only not from report.
Thanks
Jerome Marshal.J
Hai, i am trying this
OnAfterGetRecord() {To assign Values to the excel cells}
Sheet.Range(‘A’+j).Value := Customer.“No.”;
Sheet.Range(‘B’+j).Value := Customer.Name;
j:=INCSTR(j);
here we have A,B what these are, and here i am getting errors . can you give me a clear view for this .
Thanking you in advance
What error you are getting ?
Here A refers to the column name and j refers to row number (which should be a integer) in excel…
The error is
This message is for c/al programmers:
An exception was raised in method Range. The OLE control or Automation server has returned error (hresult)-2147352567.
The component did not provide the exception description.
Thanks
you just change the type of the variable j to text(sub type
Hi Marshal,
Can u tell me what is ‘Add’ Here.
Should i need to define ‘Add’ in variables.
Thank U
If you look in the excel buffer table there should be information in there up to the point it bombed off.
Look at the last entry in the table.