Are you using a dataset? If you are using a dataset specify the datatype of the picture column to System.Byte[]. Then from the database set the value to that column as below : DataColumn mycolumn = new DataColumn ("Picture"); mycolumn.DataType = typeof(System.Byte[]); mysdset.Tables[0].Columns.Add(mycolumn); mysdset.Tables[0].Rows[0]["Picture"] = GetImageData(Server.MapPath("~/ABC.Jpg")); byte[] GetImageData(string fileName ) { //Method to load an image from disk and return it as a bytestream System.IO.FileStream fs = new System.IO.FileStream(fileName,System.IO.FileMode.Open, System.IO.FileAccess.Read); System.IO.BinaryReader br = new System.IO.BinaryReader(fs); return (br.ReadBytes(Convert.ToInt32(br.BaseStream.Length))); } Hope this helps you
Kanniah
Posts
-
Error Cannot implicitly convert type 'byte' to 'CrystalDecisions.CrystalReports.Engine.BlobFieldObject' -
SQL DB error: timeout problemTry to increase the querytime out value while connecting to database
-
need help with SQL"SELECT eInfo.EmpID, eInfo.Name, lInfo.LeaveEnteredOn, lInfo.LeaveFrom, lInfo.LeaveTo, lInfo.LeaveType " + " FROM lmsEmpInfo AS eInfo INNER JOIN lmsLeaveInfo AS lInfo ON lInfo.EmpID = eInfo.EmpID " + " WHERE (lInfo.LeaveGranted = 0)" When you try to form an Sql by Concating always insert one space before '"' Hope this helps Kan
-
Alignment Problem in Crystal ReportHi Select the Object and click the right mouse button and select format and set the alignment. Kan
-
Crystal Report Components for Deployment ProgramHi Try this pdf. It gives a complete info on how to deploy and after deploy problems http://support.businessobjects.com/communityCS/TechnicalPapers/crnet\_deployment.pdf Hope this helps Kanniah
-
Deployment of A program in VB.NetHi I don't think framework gets bundled with your setup program. Your setup program just contains the files that it requires to run (if you have added any extra files). You have to isntall the .net framework separately on the client machine and then install your application. Hope this helps Kanniah
-
Help with .NETHi First you need the I.P of the other computer that you want to connect to. Either it must have a static ip / dynamic ip. If it is static ip then you can connect to that computer easily. if it is dynamic ip, you need some application to run on the dynamic ip machine to inform the current ip that it has been assigned. hope this helps. Kanniah
-
open folderHi You can set the "Path" property of the filelist box. Hope this helps! Kanniah
-
how to write the numeric value into currency format in wordsHi if you want to display number to words!! write to me I will help you. Kanniah
-
How to store the system clock in a variableHi You have got it wrong! Declare a Public variable something like Public MyHalfAnHour as Integer If you have set the timer control as 1 minute. Keep incrementing the above variable in the timer control event and when the incremented value is 30, it means that 30 hour has lapsed and close the application else leave the application as it is. 2. When the user clicks the end button on the second form initialize the variable. I hope it helps!!! Kanniah
-
How to save users added controls?Hi what you have written is correct. I don't think there is any other way to do this. Kanniah
-
crystal report urgentHi you can use the record selection formula to specify your filter Kanniah
-
How to save users added controls?Hi You have to store the information somewhere in the database/textfile from where you can load the controls when the user wants at a later stage. The information to be stored are Control Type, Left, Top, Width and Height, so that you can recreate the controls and set these properties. Hope this helps you. Kanniah
-
Comparing Results between two DatareadersHi You can go for Datasets, which is much easier to loop (as you can forward / rewind the dataset) you cannot do this in a datareader. All the Best! Kanniah
-
Need a code to close the application after specific timeHi This is the first time I am replying a query. All the Best!. Unless you unload the form that contains the Timer control you can keep count of the ticks. In the timer control event you check for the period after which you want to close the application. If it is visual basic, you can use this code, Close All End If it is vb.net Application.Exit Hope this helps you. Kanniah