Display a picture in an array?

anniqa
Member Posts: 16
I made a Label-Typ report to create labels which should include the Item.Picture field. I can't find any good example in the C/AL reference guide how to accomplish this, all outstream examples uses text.
When I try to assign the following to a variant variable the compiler doesn't like the syntax.
recitem.Picture.CREATEOUTSTREAM(pic);where pic is an Outstream global.
How would I get the resault which I'd like to assign to an Arr[]?
When I try to assign the following to a variant variable the compiler doesn't like the syntax.
recitem.Picture.CREATEOUTSTREAM(pic);where pic is an Outstream global.
How would I get the resault which I'd like to assign to an Arr[]?
0
Comments
-
1) You want to show more pictures in one Section? If yes, you need to use Array of records. You cannot "save" blob into variable.
2) It means to use something like recItem[1].Picture etc.0 -
Yes, I made a report with two columns with the intention to print shelf-labels from the Item table. NAV then creates a two-dimensional array which behaves perfectly till it comes to the picture field....just can't figure out how to get the addr[1][5]to show the picture instead of '*' .0
-
-
The problem is that if I use a Picture box it picks the same picture in both columns...I'd like to get the picture-field into the array somehow. Thought the trick was outstream to place a blob into an array...no success:(0
-
No, you are thinking in wrong way. For reading the picture, you are using some record. You can create new record variable with same type and create array of these record. you just needs to get correct record into each variable and use it in the Picture box. It means you cannot create the array of just the field picture, but you can create array of whole records with the field...0
-
What I'm trying to achieve is to display a picture in a [arr] ?? it should be possible?0
-
Are you reading, what I wrote? You cannot create array of pictures, but you can create array of records with picture field. You cannot store picture in some variable, you can just use the BLOB field of some record. But you can create array of records without problems. Think about it, try it, if you have some problem with it, ask.0
-
by NAV when I use the wizard to make a label-type report. And when I pick the Item.Picture as SrcExp instead of Addr[ColumnNo][5] it doesn't understand that it should be the next picture, it picks the same picture in both columns.0
-
Of course.
I will not repeat what I wrote. You cannot just replace text variable by picture variable in NAV. It is not working in this case. You need to change the logic and use array of records instead array of text variables. And you cannot use same control as for text when you want to show picture.
But because for me it seems that you are not skilled in this, I recommend to read some documentation first, or just to try how to show some picture in simple report.
If you will succeeded in this simple task, try second step - show two pictures in one section.
The wizard is not working in this case, you need to do some C/AL coding for that and create the controls on the sections manually.0 -
is that when I created a report without the wizard and skipped the columns and added the controls "manually" just to test the following works!!???
Addr[ColumnNo][1] := FORMAT("No.");
Addr[ColumnNo][2] := FORMAT(Description);
Addr[ColumnNo][3] := FORMAT(Picture);
Addr[ColumnNo][4] := FORMAT("Recommended Price");
Addr[ColumnNo][5] := FORMAT(Barcode);
Addr[ColumnNo][6] := FORMAT("Label Text");0 -
Addr[ColumnNo][3] := FORMAT(Picture);
You cannot format Picture to text [-X
You cannot use Addr variable for picture [-X
Sorry, but may be someone other will be able to describe the solution for you. ](*,)
But once again, try to find out how the Picture Box works (e.g. on some report which is using logo from CompanyInfo), try to learn some NAV basics (e.g. application designer guide).
And take it easy, sometime it is hard for me to describe something obvious for me to someone other, just keep learning and trying...
8)0
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