Show image/picture from server in factbox
kabroco
Member Posts: 111
Hello,
I have a problem with showing a picture in a factbox.
The picture is not stored in a NAV table, but present in a file on the server (where the RTC runs).
All the data about location are stored in a NAV table.
A record with image ID, is linked to a factbox based on the source "Image table" (this table contains the file location and name).
I tried to get this working.
I added a VAR TempImage (TempImage = a table that contains a blob file).
In the onaftergetrecord from the factbox I tried to get the file and
TempImage.Picture.IMPORT(FileRec.Path + FileRec.Name);
I placed this field in a control of the factbox.
The file is found and imported but not shown.
Can a factbox only show fields from the sourcetable?
Any suggestions how to solve this?
Thanks in advance.
EDIT:
OR: how should I show pictures from file in a factbox? (maybe my solution is totally wrong) :-k
I have a problem with showing a picture in a factbox.
The picture is not stored in a NAV table, but present in a file on the server (where the RTC runs).
All the data about location are stored in a NAV table.
A record with image ID, is linked to a factbox based on the source "Image table" (this table contains the file location and name).
I tried to get this working.
I added a VAR TempImage (TempImage = a table that contains a blob file).
In the onaftergetrecord from the factbox I tried to get the file and
TempImage.Picture.IMPORT(FileRec.Path + FileRec.Name);
I placed this field in a control of the factbox.
The file is found and imported but not shown.
Can a factbox only show fields from the sourcetable?
Any suggestions how to solve this?
Thanks in advance.
EDIT:
OR: how should I show pictures from file in a factbox? (maybe my solution is totally wrong) :-k
0
Comments
-
Your solution is quite right, but the picture field has to be in the source table.
You can import the picture without saving the record when the factbox is displayed, it doesn't have to be in the database permanently.
This is from something I made years ago:
0 -
That means I have to add a blob field to the ImageTabe, an load the file into the blob temporarily. I'll try that.
There is no way to show for instance the company information picture in a factbox that is not based on the companyinformatio table. Tried that too. This image did not show either.(did not forget the calcfields...)
Nice dress, by the way.;-)
Thanks, Carolien0 -
You could use also a temporary record of TempBlob table (99008535), avoiding custom table creation
* Daniele Rebussi * | * Rebu NAV Diary *0 -
Thanks for the tip!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
- 328 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
