473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net + crystal report

Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a crystal
report with one image that changes depending of some data.
I am using a Oracle database and for me is not important if the images are
on the hard drive or in the database... I just dont know how ti implement a
image that changes in the crystal report

Thanks in advance... kindly regards
Nov 19 '05 #1
5 1921
"=?Utf-8?B?RGFtaXI=?=" <Da***@discussions.microsoft.com> wrote in
news:B1**********************************@microsof t.com:
Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a
crystal report with one image that changes depending of some data.
With the vs.net version of Crystal Reports this is trick to do. But this
is how you do it:

1. Create a dataset with a BLOB column (System.Byte[] column)

Dim _dcLogo As DataColumn = New DataColumn("Logo", System.Type.GetType
("System.Byte[]"))

2. Populate the new dataset with the data you wish.

3. Stuff the graphic into the Blob column.

'Read data into a byte array
'Read data into a byte array
Try
Dim _fs As FileStream = New FileStream(_ImagePath, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)
Dim buff(_fs.Length) As Byte
_fs.Read(buff, 0, buff.Length)
_fs.Close()

Dim _dr As DataRow = _Table.NewRow

'Put buffer into Logo Field
_dr("Logo") = buff

_Table.Rows.Add(_dr)

Catch ex As Exception

End Try
4. In the report designer, drag the blob column onto your report,
Crystal will automatically output the blob in the proper graphics format
(JPEG, GIF, etc). I've only tried using the BLOB column with JPEG
graphics.

I am using a Oracle database and for me is not important if the images
are on the hard drive or in the database... I just dont know how ti
implement a image that changes in the crystal report

Thanks in advance... kindly regards


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Lucas Tam <RE********@rogers.com> wrote in
news:Xn***************************@127.0.0.1:
"=?Utf-8?B?RGFtaXI=?=" <Da***@discussions.microsoft.com> wrote in
news:B1**********************************@microsof t.com:
Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a
crystal report with one image that changes depending of some data.


With the vs.net version of Crystal Reports this is trick to do. But this
is how you do it:


oops, it's getting late tonight:

With the vs.net version of Crystal Reports this is tricky to do. But this
is how you do it:

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #3
I will try.. thanks...

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"=?Utf-8?B?RGFtaXI=?=" <Da***@discussions.microsoft.com> wrote in
news:B1**********************************@microsof t.com:
Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a
crystal report with one image that changes depending of some data.


With the vs.net version of Crystal Reports this is trick to do. But this
is how you do it:

1. Create a dataset with a BLOB column (System.Byte[] column)

Dim _dcLogo As DataColumn = New DataColumn("Logo", System.Type.GetType
("System.Byte[]"))

2. Populate the new dataset with the data you wish.

3. Stuff the graphic into the Blob column.

'Read data into a byte array
'Read data into a byte array
Try
Dim _fs As FileStream = New FileStream(_ImagePath, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)
Dim buff(_fs.Length) As Byte
_fs.Read(buff, 0, buff.Length)
_fs.Close()

Dim _dr As DataRow = _Table.NewRow

'Put buffer into Logo Field
_dr("Logo") = buff

_Table.Rows.Add(_dr)

Catch ex As Exception

End Try
4. In the report designer, drag the blob column onto your report,
Crystal will automatically output the blob in the proper graphics format
(JPEG, GIF, etc). I've only tried using the BLOB column with JPEG
graphics.

I am using a Oracle database and for me is not important if the images
are on the hard drive or in the database... I just dont know how ti
implement a image that changes in the crystal report

Thanks in advance... kindly regards


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #4
Sorry still no results:(
don't know whats happening... i don't get any error but the image is not
shown... here is my code:

Try

Dim _fs As FileStream = New FileStream("c:\a.bmp", FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)

Dim buff(_fs.Length) As Byte

_fs.Read(buff, 0, buff.Length)

_fs.Close()

Dim _dr As DataRow = IspisRacunaDS1.SLIKA_TABLE.NewRow

'IspisRacunaDS1 - dataset

'SLIKA_TABLE - table

'LOGo is a column of the table of a base64Binary type

IspisRacunaDS1.SLIKA_TABLE.Rows().Add(_dr)

_dr("Logo") = buff

_dr("ID") = 1

Catch ex As Exception

End Try

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"=?Utf-8?B?RGFtaXI=?=" <Da***@discussions.microsoft.com> wrote in
news:B1**********************************@microsof t.com:
Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a
crystal report with one image that changes depending of some data.


With the vs.net version of Crystal Reports this is trick to do. But this
is how you do it:

1. Create a dataset with a BLOB column (System.Byte[] column)

Dim _dcLogo As DataColumn = New DataColumn("Logo", System.Type.GetType
("System.Byte[]"))

2. Populate the new dataset with the data you wish.

3. Stuff the graphic into the Blob column.

'Read data into a byte array
'Read data into a byte array
Try
Dim _fs As FileStream = New FileStream(_ImagePath, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)
Dim buff(_fs.Length) As Byte
_fs.Read(buff, 0, buff.Length)
_fs.Close()

Dim _dr As DataRow = _Table.NewRow

'Put buffer into Logo Field
_dr("Logo") = buff

_Table.Rows.Add(_dr)

Catch ex As Exception

End Try
4. In the report designer, drag the blob column onto your report,
Crystal will automatically output the blob in the proper graphics format
(JPEG, GIF, etc). I've only tried using the BLOB column with JPEG
graphics.

I am using a Oracle database and for me is not important if the images
are on the hard drive or in the database... I just dont know how ti
implement a image that changes in the crystal report

Thanks in advance... kindly regards


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #5
"Damir" <da***********@hotmail.com> wrote in
news:Oq**************@TK2MSFTNGP12.phx.gbl:
Sorry still no results:(
don't know whats happening... i don't get any error but the image is
not shown... here is my code:


remove the try statements from the code... so that an error will be thrown.

Then see what error is occuring : )

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #6

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

Similar topics

1
19127
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
13
15110
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
4460
by: Dr. Indera | last post by:
hello, i previously posted the questions below on several crystal reports newsgroups, including the one for the company that makes crystal reports, but never got an answer, so i'm hoping that...
2
4905
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
1
12139
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
3060
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
0
2248
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
9
8229
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
0
2943
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
11
9663
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5594
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
5022
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
4688
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
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.