Include Filename on report
evoskou
Member Posts: 3
I created a report that takes data from a dataport, so i import a txt file and then do some data and then upload my data. on the header of the report i want to show the file that was used to import the data for keeping good records because this task is done every day..
how do i do that? anyone?
how do i do that? anyone?
0
Comments
-
You can create a single-instance codeunit ( set under Codeunit properties), Save the file name in a text variable of this codeunit (create a function in the codeunit for this) when importing the data, then read it back out when printing the report.
The file name will be saved in the single-instance codeunit until the company
is changed or the database is closed.Kai Kowalewski0 -
Hello Evoskou!
If I undersand correctly, you have a report that runs a dataport and you want to show file name of the dataport. If so, you may do it that way:
1. In report create Dataport variable that points out your Dataport. For example Test is a name of Dataport variable.
2. Next in report type Test.RUNMODAL; - this runs your dataport.
3. In dataport create function that returns file name. First in dataport you have to assign currdataport.filename to a variable. Otherwise you may receive error message that file is not open. So it may be like this: in OnPostDataport section type:
FileName := CurrFile.NAME;
and function (e.g. GetFileName) has one line:
EXIT(FileName);
4. Next in report create variable e.g. FileName and type
FileName := Test.GetFileName;
after dataport call and you can put variable FileName (report) into report.
Below you can find my private email. If you want me to send you a test fob of this functionality just send me a request, please.
Best Regards/Pozdrawiam
Marcin Woch
_____________________
"ANTEI" Woch Marcin
email: marcinwoch@wp.pl
tel.: (+48608) 39 46 29
Poland0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 323 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
