logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
adageamar  
#1 Posted : Tuesday, September 8, 2015 11:21:25 AM(UTC)
adageamar

Rank: Newbie

Groups: Registered
Joined: 9/8/2015(UTC)
Posts: 1
India
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,
epf  
#2 Posted : Tuesday, September 8, 2015 12:12:11 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

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.
gaurav11  
#3 Posted : Friday, April 21, 2017 5:31:39 AM(UTC)
gaurav11

Rank: Newbie

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 6
Man
India
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+"' />";
thanks 1 user thanked gaurav11 for this useful post.
epf on 4/21/2017(UTC)
arvind  
#4 Posted : Saturday, March 3, 2018 8:51:16 AM(UTC)
arvind

Rank: Newbie

Groups: Registered
Joined: 3/1/2018(UTC)
Posts: 7
India
Location: ahmedabad

can i pass current userid and locationId

Edited by user Saturday, March 3, 2018 8:51:53 AM(UTC)  | Reason: Not specified

arvind  
#5 Posted : Saturday, March 3, 2018 8:54:52 AM(UTC)
arvind

Rank: Newbie

Groups: Registered
Joined: 3/1/2018(UTC)
Posts: 7
India
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 = "";
}
}
}
Users browsing this topic
Guest (3)
Similar Topics
Varbinary data to show as Image in report (Reports)
by BrentM.Adams36 7/16/2018 7:43:55 AM(UTC)
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.