Importing a Picture in Navision through Dataports
write2sourav
Member Posts: 113
Hi,
I have 100 pictures for 100 items for the item card. Is it possible to import all those pictures through a dataport or do i have to follow a manual process to inport them for each item. Plz help.
I have 100 pictures for 100 items for the item card. Is it possible to import all those pictures through a dataport or do i have to follow a manual process to inport them for each item. Plz help.
0
Comments
-
Make a Report (DataItem= Item) with a request-form where you place a textbox with the SourceExpression FilePath.
Global Variable : 'FilePath' Datatype=Text / Lenght 1024
Local Variable : 'PicFileName' Datatype=Text / Lenght 1024
In the OnafterGetRecord():
IF Picture.HASVALUE THEN
CLEAR(Picture);
PicFileName := STRSUBSTNO('%1%2.bmp',FilePath,"No.");
IF FILE.EXISTS(PicFileName) THEN BEGIN
Picture.IMPORT(PicFileName,FALSE);
MODIFY;
END;
Lets say your picturefiles are on C:\Temp\pictures\ and the name of your pictures are starting with No. (Field No. in Item).BMP
Type the path (C:\Temp\pictures\) in the textbox from the Report Request Form and push Run...0 -
You can import them with anything. You just needs to know which picture file is connected to which record (it can be in some file - <RecID>,<filename>) etc. After that, you just needs to iterate through all the records and import the correct picture into it.0
-
If each picture is named the same as it's item number it's a piece of cake.0
-
If each picture is named the same as it's item number it's a piece of cake.
If not, then maybe you can use a little help from a File renamer. (http://www.sherrodcomputers.com/products_filerenamer.cfm or other programs... ?)
Making it 'a piece of 2 cakes'?
_______________________________________0 -
Marcel G. wrote:Make a Report (DataItem= Item) with a request-form where you place a textbox with the SourceExpression FilePath.
Global Variable : 'FilePath' Datatype=Text / Lenght 1024
Local Variable : 'PicFileName' Datatype=Text / Lenght 1024
In the OnafterGetRecord():
IF Picture.HASVALUE THEN
CLEAR(Picture);
PicFileName := STRSUBSTNO('%1%2.bmp',FilePath,"No.");
IF FILE.EXISTS(PicFileName) THEN BEGIN
Picture.IMPORT(PicFileName,FALSE);
MODIFY;
END;
Lets say your picturefiles are on C:\Temp\pictures\ and the name of your pictures are starting with No. (Field No. in Item).BMP
Type the path (C:\Temp\pictures\) in the textbox from the Report Request Form and push Run...Anil0 -
hai ............how to convert the jpg picture to bmp pictur
Here I use the batch-option 'Export' to BMP from Macromedia FireWorks.
But there are more graphic programs that have 'a look a like' batch propertie for converting directories with JPG, JPEG pictures to BMP at once.
________________________0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 327 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
