|
Form2 is being destructed immediately after the Show() method, causing it to be closed.
/ravi
|
|
|
|
|
Hi All
i need to print a departmental store slip on 4.0 inch wide on paper roler.
if any body can help me
thanks
Thaer
|
|
|
|
|
- Connect the printer to your computer and ensure all drivers are installed.
- See this[^] article.
/ravi
|
|
|
|
|
i m programatically building a datatable and populating that datatable with data from a text file.nw i m assigning that datatable to report viewer but report viewer is not showing any data.here is my code
if (counter != 0)
{
for (int j = 0; j < counter-1; j++)
{
fieldValues = file.ReadLine().Split(new char[] { '\t' });
DataRow dr = dt.NewRow();
for (int i = 0; i < fieldValues.Length; i++)
{
dr[i] = fieldValues[i].ToString();
}
dt.Rows.Add(dr);
}
}
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
this.reportViewer1.LocalReport.ReportPath="C:\\Documents and Settings\\amohiuddin\\My Documents\\Visual Studio 2008\\Projects\\sample reporting application\\sample reporting application\\Report1.rdlc";
this.reportViewer1.LocalReport.ReportEmbeddedResource = "sample reporting.Report1.rdlc";
this.reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.DocumentMapCollapsed = true;
this.reportViewer1.DataBindings.Clear();
this.reportViewer1.LocalReport.DataSources.Add(rds);
this.reportViewer1.Show();
this.reportViewer1.RefreshReport();
}
can someone tell me what i m missing?
|
|
|
|
|
Try without refreshing the report at last, may be this will help you
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
I've got a large Azure/C# project ahead. I was ready to
install Win7, but I'm not sure whether there are marked
advantages or disadvantages to using 32-bit vs 64-bit.
The project is mostly C#, which could be 32-bit or 64-bit,
but it will include at least one legacy unmanaged 32-bit DLL.
We haven't decided how to deal with the DLL yet...maybe a
wrapper, or maybe just set it up as a separate process that
will talk to managed code via TCP/IP (seems like comm options
are limited).
We'll also need to deal with a couple other unmanaged apps
that won't be going into Azure-land. But development concerns
would still relate.
If you can think of any notable advantages or disadvantages
in 32-bit vs 64-bit, I'd appreciate your insight.
|
|
|
|
|
Like others users some prefer using 32bit instead 64 bit, such as myself. My reason is this: Windows 64bit has a poor support and often doesn't work properly with 32 bit app
|
|
|
|
|
Hello, I'm new to the forum here. I'm currently using the Windows mobile 6 to create a database from the SQL Compact database edition. I'm currently facing this problem clearing of database. This is the code snippet below. I'm grateful for any help given. Thanks.
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();
//cmd.CommandText = " DROP TABLE LOCATION";
cmd.CommandText = "DELETE from LOCATION where No = @No";
//=@No, DateAndTime=@DateAndTime,LocationInformation=@LocationInformation ";
-- cmd.ExecuteNonQuery(); -- This is the line where the error surfaced. "SqlCeException was mishandled (A parameter is missing. [ Parameter ordinal = 1 ] )"
this.Refresh();
conn.Close();
Codenoobie
|
|
|
|
|
In your delete query you have specified a parameter "@No" but you have not added that parameter to your SqlCeCommand object.
cmd.Parameters.AddWithValue("@No", Value);
Just replace Value with a variable that has the value of No that you want to delete.
|
|
|
|
|
Actually, "No" is the fieldname of the database, can i still use this approach to clear the database?
//---create the two tables---
SqlCeCommand cmd = new SqlCeCommand(
"CREATE TABLE LOCATION(No int " +
"identity(1,1) PRIMARY KEY, " +
"DateAndTime nvarchar(80)," +
"LocationInformation nvarchar(80))", conn);
cmd.ExecuteNonQuery();
codenoobie
|
|
|
|
|
OK basic SQL Language lesson, the command;
DELETE FROM LOCATION
Will clear ALL the data from the table LOCATION, if this is all you want to happen use the following SqlCeCommand code;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE FROM LOCATION";
However the query you have in your code is;
DELETE FROM LOCATION WHERE No = @No
Take note of the "@No" value, this is a parameter that you need to supply a value for.
What this is saying is to delete the records from the LOCATION table where the No field is equal to the @No parameter. This is why the error message you are receiving is "SqlCeException was mishandled (A parameter is missing. [ Parameter ordinal = 1 ] )", this is telling you that you have not supplied a value for the first parameter in your query, which is "@No"
If you use;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE from LOCATION where No = @No";
cmd.Parameters.AddWithValue("@No", Value);
This will only delete the records from the LOCATION table where the No field is equal to the value you supply for the @No parameter.
|
|
|
|
|
This is really really a late reply but I'm really grateful for your help, Thank you =)
|
|
|
|
|
Hi,
I have a html code dynamically generated from my server and i want to display it in windows form. inside any control which could do that. I don't want to implement the full web browser control. 'cause i am not going to display a browser but just the html output. What could be the options in C#?
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
The WebBrowser control is the only reasonable way to do it.
|
|
|
|
|
Thanks. i included the webbrowser control and it is appearing well as expected by making this property false. webBrowser1.AllowWebBrowserDrop = False
Now i have html code and i want to render that in the browser control instead of giving a url.
This html code is dynamically generated by me from my local system. ?
meanwhile i will try to find that out from msdn ....
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
yep. read the MSDN documentation on WebBrowser, discover the DocumentText property, and don't forget to disable some interactions through other properties if you want it for output only.
modified on Sunday, December 20, 2009 3:17 PM
|
|
|
|
|
Yes. Now i got it all into my program and it is working as expected.
My program connects to a server script through socket, gets the response and render it as html.
First i wrote it in C (WIN32 API) but displayed only as text. The size was 130kb and here it is just 20kb.
I guess object codes were totally compiled into a final exe for sdk and with respect to C# it should be cause of the framework which reduces the size like visual basic 6.0. I am new to c# just a few days back i started this . so was this question from a novice.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Very good.
It seems you successfully skipped "Hello World" then.
|
|
|
|
|
Hehe .. yes ... anyway thanks all for your replies. i have written a word reminder program and have published in my site which i want like wordweb.co.uk 's dictionary program.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Check my Code Project Article Scraping article[^]. I render HTML in a form.
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
ok. i will examine your code to get more info so that will add more ideas.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
int? i = 7;
what does it mean?
what is actual application of nullable.
|
|
|
|
|
One typically would use a Nullable if the variable needs a "I don't know the value" state (similar to "null" for reference types). For some value types, you don't need all possible values and can use a special value, such as DateTime.MinValue; for others, all conceivable values could be meaningful and the "no value" state needs a separate something (which happens to be a hidden boolean in Nullable, so they are costing more memory and more cycles).
I'm not very fond of Nullable, one can easily do without them.
|
|
|
|
|
|
The other common scenario that Luc didn't mention is when interacting with databases that have nullable integer fields.
|
|
|
|