Demo of Excel buffer usage

Administrator
Member, Moderator, Administrator Posts: 2,506
Demo of Excel buffer usage
This small report shows the easy usage of the excel buffer table to create excel exports.
This report can be modified by end users who have the report and dataport designer granule.
http://www.mibuso.com/dlinfo.asp?FileID=596
Discuss this download here.
This small report shows the easy usage of the excel buffer table to create excel exports.
This report can be modified by end users who have the report and dataport designer granule.
http://www.mibuso.com/dlinfo.asp?FileID=596
Discuss this download here.
0
Comments
-
Mark, this is just amazing. This is exactly that kind of idea that has always been right befoure our fingertips, but they idea to actually use, for some mysterious way, never really occured.
Honestly, it's the best reporting solution out there, because it's free (as compared to Jet Reports), it's 200% customizable, and it's faster and a lot more trustable than f***ing around with SQL queries into Excel, which I usually did.
If we use OpenWorkbook instead of CreateWorkbook (code can nicely copied from Accounting Schedule / Export to Excel), the Excel file preserves all Excel functions, formatting and whatever. It means we will never ever will write all those stupid reports that always plagued my life, but tell clients to design themselves whatever report they want it Excel with all the SUMs and conditional formatting and whatever, and we just populate it with data.
Actually, I currently have a client that needs a real cash-flow, adding together everything from bank accounts to open orders, with different percentage weights. I wanted to do it with SQL queries in Excel, but know will just use this. Hell, it's even faster than writing reports the normal way, because I don't have to mess around with field sizes anymore.
Thanks a lot. I just don't understand why didn't it occur to me0 -
after that review - how can I NOT download it and check it out! =P~1
-
Hi,
Down loaded the example not bad at all do you know if there are plans to include this on a wizard in a later release as i belive that it could be simplified but as i am a new user i believe this is a relatievely new option?
thanks,
BMCK0 -
nadnerb wrote:Hi,
Down loaded the example not bad at all do you know if there are plans to include this on a wizard in a later release as i belive that it could be simplified but as i am a new user i believe this is a relatievely new option?
thanks,
BMCK
the excel buffer is not that new, if that's what you're talking about, but documentation on how to use it wisely hasn't exactly been great0 -
Imagine that you could have an Excel template with functions already in there. All you'd need to do is fill up a data sheet using the buffer table and it should work real nicely. I don't know if it's in the sample, but you can also code functions in the buffer table in C/AL code.0
-
Exactly that's the way I am using it.
To choose Excel file, FileName := FileOpenDialog.OpenFile('Excel file','',2,'*.xls',0); in the OnLookUp of a text field where FileOpenDialiog is an instance of CU Common Dialog Management. To open Sheet,
SheetName := TempExcelBuffer.SelectSheetsName(FileName); in another textbox - OnLookUp.
Then it's the same, and the OnPostDataItem is:
TempExcelBuffer.OpenBook(FileName,SheetName);
TempExcelBuffer.CreateSheet(SheetName,'Inventory List',COMPANYNAME,USERID);
TempExcelBuffer.GiveUserControl;0 -
What would be really nice is something like a free Jet by specifying table, filters etc. in an Excel template, but I think it would be too much for a hobby project...0
-
Please also remember NAV has a codeunit 412 Common Dialog Management.
This saves you the trouble of defining the COMDLG ocx yourself with having the risk of recompiling on a non-visuals studio pc without the apropriate license.0 -
Khm... "is an instance of CU Common Dialog Management"0
-
Oops, my bad :oops:
Must be my jetlag
At least we follow the same path0 -
Yes, we follow the same path: you from Boston to Appeldorn and I from my chair to the kitchen to get a coffe: both goes eastward0
-
Hi, I am a beginning developer in Navision. I tried this download and it works fine, but I would like to add more fields to it. If I use a TextField then all works great, but if I use another type like Amount (which is decimal) I get the expected error. How do I correct this in the code? Also, is it possible to change this report to get the following: An overview of all sales (invoices minus credit memo) and is it possible to group this result by Campaign for example? Thanks for your idea's in advance
Spade0 -
You can add decimal fields or integer fields by using the FORMAT(Variable) statement.
If you want to export other information, just make a report like you do for normal reports and instead of creating secions you export the information to excel. If you use the excel code in groupfooters you can even use the grouping functionality for your excelexport.0 -
Thanks for your quick reply
It may sound stupid but where exactly do I place the FORMAT?
This is a snippet of the concerning code:
Row := Row + 1;
EnterCell(Row, 1, "No.", FALSE, FALSE, FALSE);
EnterCell(Row, 2, Name, FALSE, FALSE, FALSE);
EnterCell(Row, 3, Address, FALSE, FALSE, FALSE);
EnterCell(Row, 4, Amount, FALSE, FALSE, FALSE);
The last line has to be formatted to decimal0 -
EnterCell(Row, 4, FORMAT(Amount), FALSE, FALSE, FALSE);
0 -
Thanks but I still get 0 for all customers in the decimal field, while these are filled with large amounts when I run the table... that's why I thought the length parameter had to be added...
This is my code:
Row := Row + 1;
EnterCell(Row, 1, "No.", FALSE, FALSE, FALSE);
EnterCell(Row, 2, Name, FALSE, FALSE, FALSE);
EnterCell(Row, 3, Address, FALSE, FALSE, FALSE);
EnterCell(Row, 4, FORMAT(Payments), FALSE, FALSE, FALSE);
EnterCell(Row, 5, FORMAT(Amount), FALSE, FALSE, FALSE);0 -
I think you are exporting flowfields. These should be calculated,
Try adding this code before the exportCALCFIELDS(Amount, Payments);
0 -
I think I found it, it is because these are FlowFields I think, is that correct? Then how do I solve this?0
-
ah sorry, I just missed your response thank you0
-
It works and it makes sense, Navision rules! I can experiment with complexer reports now. Would it be possible to automatically create a second Sheet in excel where a graphic is shown?0
-
Hi Mark
I have just tested You tool in NAV 4.0 SP2 and NAV 5.0 Beta using Office 2007. I get this error:
"Could not invoke the member Add. The OLE control or Automation server returned an unknown error code."
Any ideas?
Alex0 -
Thanks so much for your code; it's really helpful and excellent. But could you please help me how to merge column or row. I really need your help. Thanks so much.-1
-
How can I use the function SelectSheetName to select the right sheet to fill it with the appropriate DATA. Thanks for help. :oops:Regards
Hanen TALBI0
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