Seal Report Forum
»
Report Edition
»
Reports
»
Varbinary data to show as Image in report
Rank: Newbie
Groups: Registered
Joined: 9/8/2015(UTC) Posts: 1 Location: Mumbai
|
I have a table column with varbinary datatype in which I stored image, how could I show that image in the report. I am new to this reporting tool, so I dont know how that is possible.
Thank you,
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
I am afraid that displaying images stored in varbinary data is not possible in this version... Sorry, but you can add this as a feature request.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 3/17/2017(UTC) Posts: 6 Location: India Thanks: 4 times Was thanked: 1 time(s) in 1 post(s)
|
I achieved it using combination of Custom SQL and Custom Script
Custom SQL cast('' as xml).value('xs:base64Binary(sql:column("tablename.columnname"))', 'varchar(max)')
Cutom Script cell.FinalValue = "<img style='display:block; width:250px;height:250px;' id='base64image' src='data:image/png;base64,"+cell.Value+"' />";
|
1 user thanked gaurav11 for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 3/1/2018(UTC) Posts: 7 Location: ahmedabad
|
can i pass current userid and locationId Edited by user Saturday, March 3, 2018 8:51:53 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 3/1/2018(UTC) Posts: 7 Location: ahmedabad
|
@using Seal.Model @using System.Web @using System.Configuration @{ ResultCell cell = Model;
ReportElement element = cell.Element; ReportModel reportModel = element.Model; Report report = reportModel.Report; ReportExecutionLog log = reportModel.Report; string str = Convert.ToString(cell.Value); var strArray = str.Split(new string[]{"####"}, StringSplitOptions.None); if(!cell.IsTitle) { if(!string.IsNullOrEmpty(Convert.ToString(cell.Value))) { cell.FinalValue = string.Format("<img src='data:image/png;base64,"+strArray[0]+"' alt='Logo' style='height:100px' />", cell.Value); } else { cell.FinalValue = ""; } } }
|
|
|
|
Seal Report Forum
»
Report Edition
»
Reports
»
Varbinary data to show as Image in report
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.