in nav5 is there a way to import mass pictures…like in importing file from excel how can i add picture there what will be my dataport…can’t use picture field because it is a BLOB…
can somebody help me please
many thanks
in nav5 is there a way to import mass pictures…like in importing file from excel how can i add picture there what will be my dataport…can’t use picture field because it is a BLOB…
can somebody help me please
many thanks
Why not create an Excel file with pointers (path + filename) to the pictures. If you also include fields in the file to associate the pictures to specific records you can import them that way.
As above if you would like as an option you can save the path to the picture. If you would like to import the pictures into Item.Picture (Blob Field) you can create a report based on the item table
Assuming all the pics are named the same as the item number of some other non duplicated field.
OnAfterGetRecord()
CLEAR(Item.Picture);
IF EXISTS (‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’)
THEN BEGIN
Item.Picture.IMPORT(‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’,FALSE);
Item.MODIFY;
END;
3rd option would be to have your pics in a network folder and with some code on form - you can call them to appear. This method also doesn’t increase your database size, if that’s an issue.
how about the dataport?
"Importing blob field is same wherever you are doing it.
*BlobField.IMPORT(Filename);*
_________________
Kamil Sacek "
there is also a tool.
http://mibuso.com/blogs/navutilus/2010/02/18/importexport-of-blob-objects-in-nav/
how will i use this? *BlobField.IMPORT(Filename); and where?*
thansk man
I’m not sure what to say to that question. Do you know about dataports? There’s a chapter in the ADG about dataports.
Above are several solutions to mass import pictures but for some unexplained reason you look right past them. Does it really matter how it’s done as long as it can be done? We use a report & a few lines of code (see above). It goes thru the item table, it looks to see if there is a particular picture in a picture directory that matches that item # & if so imports it. Isn’t that what you are looking for?
thanks for the info… i’m a newbie…just curious about things
thank you ^^
can you give nme a step by step procedure?
Item.Picture.IMPORT(‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’,FALSE); cant get this sample pls
hi savatage
can u elaborate more…
or give an example can’t make it work
pls pls pls
You create a report
the dataitem is Item
you add the following code to the report
OnAfterGetRecord()
CLEAR(Item.Picture);
IF EXISTS (‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’)
THEN BEGIN
Item.Picture.IMPORT(‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’,FALSE);
Item.MODIFY;
END;
You save & compile the report
You Run The Report.
For us we have all our item pictures stored in a network drive called p:\pitcures.
All the pictures are named the same as their item Number.
so Item 123456 would have it’s picture named 123456.BMP
Then, Item.Picture.IMPORT(‘YourDrive:\YourFolder’+Item.“No.”+’.BMP’,FALSE);
would become, Item.Picture.IMPORT(‘p:\pictures’+Item.“No.”+’.BMP’,FALSE);
That’s how I did it since it never changes, you could create a request form where you can enter and/or select a directory. save it in a variable and make the report more flexible.