|
you should be learn crystal report
|
|
|
|
|
or Reporting Services (ReportViewer,...)
|
|
|
|
|
This code works....
private void toolStripButton1_Click_1(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
try
{
// Set Processing Mode
reportViewer1.ProcessingMode = ProcessingMode.Local;
// Set RDL file
reportViewer1.LocalReport.ReportPath = (Application.StartupPath + "\\reports\\trdReport.rdlc");
// Supply a DataTable corresponding to each report data source
reportViewer1.LocalReport.DataSources.Add(
new ReportDataSource("getTrends", LoadData()));
// Add the reportviewer to the form
reportViewer1.Dock = DockStyle.Fill;
// Process and render the report
reportViewer1.RefreshReport();
}
catch (Exception ex)
{
StreamWriter writer = new StreamWriter(logFile, true, System.Text.Encoding.ASCII);
writer.WriteLine(System.DateTime.Now);
writer.WriteLine("[generate report]");
writer.WriteLine("[generate report]");
writer.WriteLine(ex);
writer.WriteLine("\r");
writer.Close();
MessageBox.Show(ex.ToString());
//this.Close();
//System.Environment.Exit(0);
}
this.Cursor = Cursors.Default;
}
private DataTable LoadData()
{
// Load data from XML file
DataSet ds = new DataSet();
string myFilePath = (Application.StartupPath + "\\bin\\" + "trd.xml");
ds.ReadXml(myFilePath);
return ds.Tables[0];
}
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I need to add reference to com object in run time.
I don't know witch com object i need in compile time.
Actually i need to choose between 2 com objects that i need to load.
I know those 2 object GUID - but i need to check in run time witch com object install on current machine and then load the right object.
How to do it ?
Thanks for the help.
|
|
|
|
|
You could do Late binding. This might help 1[^], 2[^]
|
|
|
|
|
Hi,
I wantt o know how can I detect if a mass storage devices was plugged in?
My aim is to block the mass storage devices like the USB flash memory, external hard disks & USB MP3 players as soon as user entered it..
|
|
|
|
|
You can iterate over drives and work out which ones are external. But, I don't see how you hope to 'block' them.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
what about detecting it...
and provide an option to block or unblock..
so the application will use the group policy to block and unblock.
|
|
|
|
|
When the code below executes,the btnSendMessage_Click method(Send Message) can complete normally.
But the btnReceiveMessage_Click method blocks at 'queue.Receive();' without any exception.Why can't
receive message?Do I need to configure my OS(Windows XP) yet ?
Any help will be appreciated!
private void btnSendMessage_Click(object sender, System.EventArgs e)
{
System.Messaging.MessageQueue queue =
new System.Messaging.MessageQueue(".\\Private$\\MSMQDemo");
System.Messaging.Message message = new System.Messaging.Message();
message.Body = txtMessage.Text.Trim();
message.Formatter = new System.Messaging.XmlMessageFormatter(new Type[] {typeof(string)});
queue.Send(message);
}
private void btnReceiveMessage_Click(object sender, System.EventArgs e)
{
System.Messaging.MessageQueue queue =
new System.Messaging.MessageQueue(".\\Private$\\MSMQDemo");
System.Messaging.Message message = queue.Receive();
message.Formatter = new System.Messaging.XmlMessageFormatter(new Type[] {typeof(string)});
txtReceiveMessage.Text = message.Body.ToString();
}
|
|
|
|
|
To my surprise,when I use the Computer Management tool in Windows XP,the message sent doesn't exist in the queue.But the process of sending message doesn't result in an exception!Why,why?
|
|
|
|
|
Is the queue Transactional?
|
|
|
|
|
No,it isn't transactional!
|
|
|
|
|
well that's the only way that I can reproduce the problem. On a Non-Transactional Q your code works fine; with anything else I try to make it fail it throws an exception on queue.Send(...).
|
|
|
|
|
Hi,Jimmanuel!
Why didn't the message sent exist on the queue?
|
|
|
|
|
well, like I said, the only way that I could reproduce your problem was to make the Queue transactional in which case you need to supply some extra arguments to the Send method; example here[^]
other than that your code works on my system. If that's not the problem then I'm not sure what to suggest for you.
|
|
|
|
|
Hi,Jimmanuel!
Thank you very much!
I knew the reason why the message sent didn't exist on the queue.
The Message Queue is set to be transactional while my code is non-transactional.
But surprisingly,the code doesn't throw an exception!Why?
Thank you very much again!
|
|
|
|
|
I don't know why it doesn't throw an exception, but at least it's easy enough to check for in code. Glad you got it worked out!
Jim
|
|
|
|
|
Hi there I'm getting the following error when working with Crystal maby there is someone that can help???
Error 717 Error in file c:\report.rpt: Failed to load database information.
I'm working with an old foxpro database and I've checked the report path and all that is fine. It still doesn't work.
Thanks in advance
Stephen
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
i am developing c# desktop application. in that i want to connect to mysql database which is resides on another system.please give me an idea about this.
i have already replaced [
Data Source=MySQL Database;Server=localhost; user id=root;password=****;database=sample;pooling=true";] to
[Data Source=MySQL Database;Server=http://192.168.1.64; user id=root;password=gvsadmin;database=sample;pooling=true";]
is there any other way todo this?
this connection gives out the error Unable to connect to any of the specified MySQl host
thanks
|
|
|
|
|
You just asked this few posts down. You got a reply as well. Then why repost? Did you tried anything?
Try this website.[^]
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
You're an idiot.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
dilip514 wrote: [Data Source=MySQL Database;Server=http://192.168.1.64; user
192.168.1.64 IS A LOCAL IP, go to http://www.whatismyip.com and get your ip from there and use that, also, forward your ports properly.
|
|
|
|
|
Hi,
I have many checkboxes inside a TableLayoutPanel() control.
I have added a another checkbox named SelectAll outside the table..
I used the following code for the SelectAll option, but it does not work...Please help me with this
private void SelectAll_Click(object sender, EventArgs e)
{
if (SelectAll.Checked)
{
cb.Select();
cb1.Select();
}
}
|
|
|
|
|
AFAIK there is no Select method in CheckBox class. Checked is the property you should use.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
if (SelectAll.Checked)
foreach (var checkBox in this.tableLayoutPanel1.Controls.OfType<checkbox>())
checkBox.Checked = true;
Eslam Afifi
|
|
|
|