473,511 Members | 16,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display image from file path in Crystal .NET Report

Hello all -

I'm at wits end with trying to figure out why I'm having this problem since I followed the research, that I've dug up, to a "T". I'm trying to display a JPEG image from a path directory within a Crystal Report. I created a typed dataset that is not bound to the database called dsLogo and created one field within it that has a base64binary type for the image. Once I've incorporated the dataset into the report and dropped the control where I want the image to show, I populate the dataset using this code below but am still getting an error in relation to the Query Engine. What am I doing wrong? Any thoughts are GREATLY appreciated.

' Within code-behind file that contains the viewer for the report in the Page_Load event

'Add row to Logo dataset
Dim newLogoRow As DataRow
Dim lLogo As New dsLogo
newLogoRow = lLogo.Logo.NewLogoRow
' Session("LogoImage") contains path (i.e. \\webserv\wwwroot\site\images\site1.jpg)
newLogoRow.Item("Image") = Session("LogoImage")
lLogo.Logo.Rows.Add(newLogoRow)

Thanks,

Mark
Nov 18 '05 #1
3 10253
I dont know Crystal Reports, but it looks to me like your trying to use a
UNC file path when you probably need to use a html img tag.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
Hello all -

I'm at wits end with trying to figure out why I'm having this problem since I followed the research, that I've dug up, to a "T". I'm trying to
display a JPEG image from a path directory within a Crystal Report. I
created a typed dataset that is not bound to the database called dsLogo and
created one field within it that has a base64binary type for the image.
Once I've incorporated the dataset into the report and dropped the control
where I want the image to show, I populate the dataset using this code below
but am still getting an error in relation to the Query Engine. What am I
doing wrong? Any thoughts are GREATLY appreciated.
' Within code-behind file that contains the viewer for the report in the Page_Load event
'Add row to Logo dataset
Dim newLogoRow As DataRow
Dim lLogo As New dsLogo
newLogoRow = lLogo.Logo.NewLogoRow
' Session("LogoImage") contains path (i.e. \\webserv\wwwroot\site\images\site1.jpg) newLogoRow.Item("Image") = Session("LogoImage")
lLogo.Logo.Rows.Add(newLogoRow)

Thanks,

Mark

Nov 18 '05 #2
Actually, I don't believe there is an option to incorporate an img tag within Crystal Reports .NET, from the best of my knowledge.

Mark

----- John Timney (Microsoft MVP) wrote: -----

I dont know Crystal Reports, but it looks to me like your trying to use a
UNC file path when you probably need to use a html img tag.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
Hello all -
I'm at wits end with trying to figure out why I'm having this problem since I followed the research, that I've dug up, to a "T". I'm trying to
display a JPEG image from a path directory within a Crystal Report. I
created a typed dataset that is not bound to the database called dsLogo and
created one field within it that has a base64binary type for the image.
Once I've incorporated the dataset into the report and dropped the control
where I want the image to show, I populate the dataset using this code below
but am still getting an error in relation to the Query Engine. What am I
doing wrong? Any thoughts are GREATLY appreciated. ' Within code-behind file that contains the viewer for the report in the Page_Load event 'Add row to Logo dataset Dim newLogoRow As DataRow
Dim lLogo As New dsLogo
newLogoRow = lLogo.Logo.NewLogoRow
' Session("LogoImage") contains path (i.e.

\\webserv\wwwroot\site\images\site1.jpg) newLogoRow.Item("Image") = Session("LogoImage")
lLogo.Logo.Rows.Add(newLogoRow)
Thanks,
Mark


Nov 18 '05 #3
Sorry Mark, should have made myself a bit clearer, as I said I'm not
familiar with Crystal reports - but use an http path rather than a UNC path
to an image instead and see if it makes a difference.

Session("LogoImage") ="\site\images\site1.jpg";

....I could be barking up the wrong tree entirely, so ignore me if I am....

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
Actually, I don't believe there is an option to incorporate an img tag within Crystal Reports .NET, from the best of my knowledge.
Mark

----- John Timney (Microsoft MVP) wrote: -----

I dont know Crystal Reports, but it looks to me like your trying to use a UNC file path when you probably need to use a html img tag.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
> Hello all -
>> I'm at wits end with trying to figure out why I'm having this
problem
since I followed the research, that I've dug up, to a "T". I'm trying to display a JPEG image from a path directory within a Crystal Report. I created a typed dataset that is not bound to the database called dsLogo and created one field within it that has a base64binary type for the image. Once I've incorporated the dataset into the report and dropped the control where I want the image to show, I populate the dataset using this code below but am still getting an error in relation to the Query Engine. What am I doing wrong? Any thoughts are GREATLY appreciated. >> ' Within code-behind file that contains the viewer for the report
in the
Page_Load event >> 'Add row to Logo dataset

> Dim newLogoRow As DataRow
> Dim lLogo As New dsLogo
> newLogoRow = lLogo.Logo.NewLogoRow
> ' Session("LogoImage") contains path (i.e.

\\webserv\wwwroot\site\images\site1.jpg)
> newLogoRow.Item("Image") = Session("LogoImage")
> lLogo.Logo.Rows.Add(newLogoRow)
>> Thanks,
>> Mark


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3736
by: BATISTA | last post by:
Hi , I am working in c# with crystal report XI. I read an example about dynamic image location .. 1) In that we have a xml xchema file with two fields n amed country--datatype is string,...
0
1679
by: BATISTA | last post by:
Hi I have to program in C# such that I have to add a button to the form , and create a crystal report, by getting source from the xml schema file(.xsd file) with two fields namely...
2
2373
by: TaeHo Yoo | last post by:
Would anyone be able to tell me how to display images dynomically from the database? I am using dataset which contains supplier name and supplier images. I can display supplier name but supplier...
2
3137
by: Delali Dzirasa | last post by:
I am a newbie and am creating my first asp.net in crystal reports. I have created the report (.rpt file) and have dropped the CrystalReportViewer on the web form. From the databinding...
0
7386
by: Jeff | last post by:
Help!!! The bitmap I am trying to display in a sample Crystal Report is coming up with much less quality than the original bitmap. I have a 300x300 dpi bitmap file that I want to insert at run...
1
1880
by: Rick | last post by:
Hi, guys, i have a dataset that has a string field with the path to a jpg file, can i display the image in crystal indicating just it path as string? or how can i do it? Regards. Rick PS:...
1
2960
by: Daysee | last post by:
How can i display a JPEG file from a dedicated path? example: fileformat is => <fieldname.JPEG> An image will be display depends on their user_id.JPEG. daysee
2
16606
by: smorrison64 | last post by:
I have a form that is coded to open a File Dialog boc to pick a picture to display on that particular item on a subform. My form is not based on query, but rather two separate tables (one primary,...
0
1201
by: ranesmitas | last post by:
hello, i doing programme Icard Entry .In which i take one field that photo which storer image path . when i run form and enter record in photo coloumn it stores that image path .so i want that how...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.