Export to Excel with grouping

Dosihris
Member Posts: 23
Hi,
i want to export some data, grouped by the month and the year. I have a date field in the export data. i have one dataset every day. i want to use the excel buffer. can anybody tell me, what would be the best way to export grouped data? Should i do that manually in the code or is there a way to use the grouping functionality of the report itself??
i want to export some data, grouped by the month and the year. I have a date field in the export data. i have one dataset every day. i want to use the excel buffer. can anybody tell me, what would be the best way to export grouped data? Should i do that manually in the code or is there a way to use the grouping functionality of the report itself??
0
Comments
-
You can use the Grouping functionality of the report. In your GroupHeader or GroupFooter section, stick your code to export a line to Excel. Just send whatever variables you would have otherwise displayed.1
-
ah, thank you. good to know. can you shortly explain, how to group a date field? I have a date and i want to group my data in month and year.0
-
You would need to add a field for year month, and add a key on that field. You would also need to populate the near Year Month field.
If this is a large table, it is probably better to add Year Month field to a Buffer table because of the performance hit of a key used only for one report. You would then need to populate the Buffer table prior to running the report.
If you filter the object designer tables on *Buffer* you will see some existing tables. Use the one with the data structure closest to what you need. Or create a new custom table.
The Buffer table would then be the table used by the report.0 -
You could also use a Date data item on the report and do some semi-creative filtering.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
- 320 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