473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

System.InvalidCastException Error when running code

In the below code exact line If _graphicScreenShots(intloop) =
"Summary" Then....... I get an error message

Overload resolution failed because no Public '=' can be called with
these arguments:
'Public Shared Operator =(a As String, b As String) As Boolean':
Argument matching parameter 'a' cannot convert from 'Bitmap'
to 'String'.
Code:

//
************************************************** ************************************************** ******************
Private Sub AddSummaryInformation()
If _graphicScreenShots.Count 0 Then
Dim intloop As Integer
For intloop = 0 To _graphicScreenShots.Count - 1
If _graphicScreenShots(intloop) = "Summary" Then

Dim transaction As
System.ComponentModel.Design.DesignerTransaction =
host.CreateTransaction("Drop Field")
Try
Dim report As
DevExpress.XtraReports.UI.XtraReport = reportDesigner.RootReport
Dim tmpPicBox As
DevExpress.XtraReports.UI.XRControl =
DevExpress.XtraReports.Design.FieldDragHandler.Cre ateXRControl(GetType(XRPictureBox),
reportDesigner.RootReport.Bands(DevExpress.XtraRep orts.UI.BandKind.Detail),
New System.Drawing.Point(0, 0), Nothing, reportDesigner.SnapToGrid,
reportDesigner.GridSize)

With CType(tmpPicBox, XRPictureBox)
.Image = _graphicScreenShots(intloop + 1)
.Sizing =
DevExpress.XtraPrinting.ImageSizeMode.StretchImage
.Tag = "Summary Graphic"
End With

myNC.ControlName = "picSummary"
AddToContainer(host, tmpPicBox)
Catch ex As Exception
_TListener.AddMethodError(ex)
Finally
transaction.Commit()
End Try

Exit For
End If
Next
End If
End Sub

May 30 '07 #1
1 3423

Hi,

Presumably _graphicScreenShots is an array of bitmaps? You can't compare a
bitmap to "string".

Robin
May 31 '07 #2

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

Similar topics

4
by: Ram | last post by:
I am running a test web site on my own Win2k professional computer. I have a VB6 COM component (running on COM+) on a seperate application runnint as "Server". When running an ASP.NET page calling...
3
by: karunakar | last post by:
Hi All Here iam getting this Error "Specified cast is not valid." My Project has Onc solution diffrent class libarary In that solution DALfactory solution iam getting this error I was calling...
1
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm...
4
by: DOTNET | last post by:
Hi, Anybody help me regarding this error: I am assigning the values to the session variables when the button is clicked and passing these session variables to the next page and when I am...
2
by: Michael | last post by:
Hello all and thanks in advance, I'm running a vb.net program and part of it copies files from one server to another. It generally works fine but once in a while I get this error: ...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
8
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i trying to collect windows services. i'm getting inconsistencies. the collection works every time locally. but remote collection yields different result depending on my lab environment. 1) in...
4
by: rsdev | last post by:
Hi, I have an InvalidCastException which is completely puzzling me. I have checked all the members in the stored procedure against my data provider and seems to be ok. Also in the stack trace it...
6
by: dgleeson3 | last post by:
Hello All I have VB code (.Net 2005) reading from an SQL server 2005 database. Im getting InvalidCastException when doing reader.GetInt32(0) Im simply reading an int from a simple database. It...
2
by: thithi | last post by:
Server Error in '/Assignment' Application. -------------------------------------------------------------------------------- Specified cast is not valid. Description: An unhandled exception...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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,...
0
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...

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.