i don't think this is possible, but i'll ask anyway:
i want to put bitmaps on a repeater control (in classic client we did it with bitmaplist property)
if it's not possible, i'll explain what's the business need:
there is a list of barcodes and each of them can have let's say 4-5 different statuses: the status is very important for the customer and it must be immediately visible to him: how can i do it?the line format is not feasible because it can have only 2 formats, for example green and normal.
:-k while writing i thought about freezing the status column...it can be a solution, but i want to hear from you guys, too :thumbsup:
hope to be clear, thanks in advance
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
because this "How do I show Bitmaps in a RTC Repeater?" thing came up several times I'd like to post a clarification.
The RTC can actually show pictures in the repeater, and even many more formats than the classic client! Png with transparency, Gif, Jpg, ...
This is the proof:
This is how you do it:
In the table which the page is bound to, add a field of type BLOB and Subtype Bitmap. Any field on the page that is bound to that field will happily show any picture that is stored in this table field.
This did not answer your question? - I know
You might want to show a picture based on an expression for a table that contains values, and the pictures shall come from a different table that contains all possible state pictures in your application. Actually, something like in the screenshot above.
The bad news :
There is a known bug in NAV 2009 and also SP1, that prevents that Bitmaps for an SourceExpression to another table than the page table are not delivered to a field.
The (little) good news:
You can work around it. You may maintain all state pictures in a separate bitmap table. But you also need to add a Bitmap BLOB field to the data table that you bind the page with the list to. Now you copy the respective state Bitmap over, from the Bitmap table to the data table. You can do this in the Triggers OnAfterGetRecord() and OnModifyRecord(), the latter if your list is editable.
To keep performace up, you might want to cache the records for the needed state images in variables on the page, so you do not need to search for the respective state picture in your bitmap table over and over again.
And the better news:
We will fix this for future releases.
(You may download sample objects from my Blog Post)
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/
can you explain this more specifically, please?you mean "page variables" or "variables within the page"? (the first one seems strange to me, but to be sure...)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
And the AL code for this is really a simple thing.
Have just put this info also as a post on my Blog for the only purpose of being able to attach a sample object pack. (Which I did not find possible for a forum post.)
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/
Today i've seen your code and i've created nearly the same obj as yours. What makes me doubtful is that i've to implement this on a list of about 100000 records: for every record there will be 5 visual flags. With your method i've to copy the biptmaps on every record, isn't it?The underlying table will be largely used in the db...can't this cause performance issues?
The only solution that comes in my mind, is to use a dedicated table for the list...but this means to duplicate the original data (luckly, PK is only one field)...
I don't know what is the best option... :?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
And you are right, that the flag images MIGHT be commited into the values table in the database - if something asks for posting changes. And this happens, and we clearly do not want picture data in the value table in the database.
To overcome this issue, I added code into the value table which clears the value for the image in the OnModify and OnInsert trigger.
When I then opened the value table in classic, I could not observe anymore that picture data get saved into the value table in the database at any time (no '*'s showing). But still the flag pictures show up nicely in RTC.
(Have updated the sample code.)
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/
we just need a currpage.update (or just tell the user to press F5 to update the page) in order to have the bitmap updated properly, but not really in the database! \:D/
Yesterday i tought about a clear loop in the onclose page, but i didn't tried it. Today i tried with your oninsert/modify clear and it works! thank you!
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
anyway, the performance on this table (2 normal fields + 5 blobs) with 100000 record is good on browsing the list.
the update is also fast
the size of the table on the db is less than 3 megabytes
the result is then pretty good in my opinion, thanks a lot!
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Try using the pictures with transparency...
(And here a "wast your weekend challenge": Can you make a list of many status pictures that appears from distance as one larger picture?)
Christian Abeln
Program Manager Microsoft
Dynamics NAV
blogs.msdn.com/cabeln/