|
how can i use that treeview in crystal report viewer? it´s always blank.
At least in the sample codes i download!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I have a database that has many types of variables; varchar, int, date, image.
I connect it to my c# application, even builted a fine dataset to fit my report.
OK, all data is present in my report, but the images aren´t there!!!
The IBLOBfieldObject suitable for pictures is always blank.
In dataset the image is a byte[], right? YES
I even trigger the same procedure in a datagridview and the pictures appear there!!!
I dont have a clue
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
You do not have the correct format recorded images in a database
You can use this code
private void Button3_Click(object sender, System.EventArgs e)
{
Stream imgStream = UploadFile.PostedFile.InputStream;
int imgLen = UploadFile.PostedFile.ContentLength;
string imgContentType = UploadFile.PostedFile.ContentType;
byte[] imgBinaryData = new byte[imgLen];
int n = imgStream.Read(imgBinaryData,0,imgLen);
String idis = Request.QueryString["id"];
int busid = System.Convert.ToInt32(idis);
int RowsAffected = SaveToDB( imgBinaryData,imgContentType, busid);
}
private int SaveToDB(byte[] imgbin, string imgcontenttype, int busid)
{
SqlConnection sqlConnection1 = new SqlConnection(ConfigurationSettings.AppSettings["povezava"]);
if (sqlConnection1.State==ConnectionState.Closed)
{
sqlConnection1.Open();
}
SqlCommand command = new SqlCommand( "update posta1 set signature = @imgData " +
" where id = @ID", sqlConnection1 );
SqlParameter param1 = new SqlParameter( "@imgData", SqlDbType.Image );
param1.Value = imgbin;
command.Parameters.Add( param1 );
SqlParameter param4 = new SqlParameter( "@ID", SqlDbType.VarChar,10);
param4.Value = dfPosta.Text;
command.Parameters.Add( param4 );
int numRowsAffected = command.ExecuteNonQuery();
sqlConnection1.Close();
return numRowsAffected;
}
|
|
|
|
|
Hi Ted,
thanks a lot for the post, iam going to check it out.
I really dont get many post/anwsers on crystal reports
again thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi, ted
you are missing assembles, and by the way i already have a routine to read image (byte []), not the question here.
I was asking about loading the pictures in crystal report, it seems everthing is ok but i didn´t know that CR doesn´t load all image types.
I know you are only trying to help
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hy
I think CR only .gif format can't load
|
|
|
|
|
Hi all,
ı wanna learn that how can i write as html on a word document. When i send the string with .typetext(); it writes it as a string. How can i do that ??
thx...
thanks for everything i have...
|
|
|
|
|
TALHAKOSEN wrote: ı wanna learn How can i do that ??
Less typing, more reading. Let us know if that helps.
led mike
|
|
|
|
|
In order to write *anything* on a word document, you have to make sure you lay it on a flat surface, and smooth it out completely (wrinkles in the document tend to distort newly added text). Then - and only then - can you write on the document. After you're done writing on the document, make sure you spray some sort of fixative over the text so it doesn't run when you spill fluids on the document.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Alternatively, he can always use some form of whiteout on the screen whenever he makes a mistake.
|
|
|
|
|
Pete O'Hanlon wrote: use some form of whiteout on the screen whenever he makes a mistake
Ah, yes, that's always the classic solution
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
yes i have already seen that article but i didnt type my text as html on word document. I found this
object pasteType = Word.WdPasteDataType.wdPasteHTML;
range.PasteSpecial(ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref pasteType ,ref oMissing, ref oMissing); but it gives me an error says {"The specified data type is unavailable."}
thanks for everything i have...
|
|
|
|
|
I found the solution, maybe somebody need it...
to write as html on c# first take clipboard as html then use stringbuilder
Object m = System.Reflection.Missing.Value;
DataObject clipDO = new DataObject();
clipDO.SetData(DataFormats.Html, HtmlClipboardData(strHTML));
Clipboard.SetDataObject(clipDO, true); // Save to clipbaord
object typeHtml = (object)Word.WdPasteDataType.wdPasteHTML;
s.PasteSpecial(ref m, ref m, ref m, ref m, ref typeHtml, ref m, ref m);
http://www.codeproject.com/script/Membership/Profiles.aspx?mid=252028
knowledge is valuable when it is shared !!!)
and nobody has a right to make fun with anyone!!
thx all
thanks for everything i have...
|
|
|
|
|
Hi TALHAKOSEN,
I know it's been 2 years on this stream, But is there any chance that you can tell me what's HtmlClipboardData(strHTML)?
Thanks for sharing your knowledge.
N
|
|
|
|
|
hi,
How can I send and receive data from clipboard to a COM port?
Best wishes
|
|
|
|
|
For sending and receiving data from COM port there is a SerialPort class. For clipboard manipulation you can use Clipboard class.
|
|
|
|
|
Hello there,
I wanna to create an application that transfer data between two computer over the internet. Can any body help me?
Please give a web link of a sample, if there is any things.
|
|
|
|
|
Majid_grok wrote: I wanna to create an application that transfer data between two computer over the internet
Good for you. Please let us know how that turns out for you.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
heh heh ...
|
|
|
|
|
I just assumed the "is urgent"
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Not necessarily so easy situation:
Majid_grok wrote: Please give a web link of a sample, if there is any things
This would require 'an application that transfer data between two computer over the internet'.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hey, Don't bother Iranian guys!
Kiddin
Hi Majid, How are you?
I think you should use .Net Remoting[^]. You can create a Tcp Server (on your computer) and a Tcp Client (on a computer thousands of miles apart) and send your data using a class that inherited from MarshalByRefObject. I have a clear sample here[^] (you should use your server IP instead of "localhost").
Hope Help Hou (Oops, You )
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Try Google for FTP - it does the job a treat
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I was recently talking to a colleague at work and the topic came round to using swith(). He said that he'd read/heard more than once that if you find yourself using a switch you can more or less be assured that its because you've done something wrong in your architecture elsewhere.
What do other folks think of this?
Cheers,
|
|
|
|