Salakhetdinov Shamil
mcp2004 at mail.ru
Fri Apr 10 10:33:39 CDT 2009
Hi Gustav, Thank you for reporting about the issue with pics on report - I have put it on http://northwind.codeplex.com/WorkItem/View.aspx?WorkItemId=479 (report's PDF attached - pics are there when run it on my system) If you can fix the issue while developing the other report please do the fix to have this report working OK with any system locale. The locale of developed here report was probably Russian not English (I haven't checked yet)... Thank you. -- Shamil -----Original Message----- From: "Gustav Brock" <Gustav at cactus.dk> To: <dba-vb at databaseadvisors.com> Date: Fri, 10 Apr 2009 16:38:17 +0200 Subject: [dba-VB] Database driven images not showing in non-english systems(solved) > Hi all > > This report didn't display pictures for me. As I didn't find it very likely for Shamil not to leave a note of some issue if this really should be the case, I looked for other possibilities for the cause of this error. Further, when I previewed the dataset in VS, the pictures did display in the grid, thus the pictures had to be present. > As the pictures are read directly from a field in the database, I guessed somehow the Report Viewer got it wrong but how? > > After some googling I located this page which is to the point and had a very good explanation of the issue which is a localization issue: > > http://forums.devarticles.com/showpost.php?p=51707&postcount=3 > > As the pictures had been stored most likely in an English version, I tried with the value of 79 for the length of the header as the article suggests: > > =System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!Picture.Value),79)) > > VoilЮ! The pictures are displayed! > > Now, the really clever thing would be to expand the expression to retrieve the length of the header automatically so a picture could be stored and retrieved by any combination of localizations. > > /gustav > > > >>> Salakhetdinov Shamil <mcp2004 at mail.ru> 09-04-2009 20:32:15 >>> > > As I have written early today I have got opprtunity to develop several reports from 3rd SCRUM Sprint, namely: > > 1) Catalog & Catalog subreport > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com >