for this u can use crystalreport and file and add parameter field
ParameterFields myParams = new ParameterFields();
ParameterField myParamGuestName = new ParameterField();
ParameterDiscreteValue myDiscreteValue = new ParameterDiscreteValue();
myParamGuestName.ParameterFieldName = "guestname";
crystalReportViewer.ParameterFieldInfo = myParams;
System.Data.SqlClient.SqlException was unhandled
Message="Parameterized Query '(@A varchar(50))SELECT DS.*\r\nFROM DS\r\nWHERE (A =' expects parameter @A, which was not supplied."
Source=".Net SqlClient Data Provider"
I get this error in this line
What I did is ... Added a textbox1, button1, crystalreportviewer1 and crystalreport11, crystalreport.rpt..
in crystalreport.rpt, I added a Parameter Field , named "AAAA" and in Set Select Editor, I set equal to parameter and added A=@A in formula editor.. Then i write this code and error happens..
Another problem, suppose there are two AgentID ... If i enters one agent Id and search for it , it works fine, but when i changes the value in textbox and enters 3nd agent id, it throws an error The SelectCommand property has not been initialized before calling 'Fill'.
I have to search agentid and my search changes frequently .. so its not happing now..
The error message you get suggests that the selectcommand from your sqldataadapter isn't set wich from what I can see it isn't.
to set the selectcommand:
sqldataadapter.selectcommand.commandtext= "SELECT [insert your column names here] FROM [insert table name] WHERE [productid]= @id"
No, it's not hanging, but waiting. Waiting for someone to send a carriage-return + linefeed to the serial port. In other words, the system is reading from the serial port, and will continue reading, until someone sends an "enter" to the serial port.
How can i be sure that the port is enabled and data has been send to the port...
Make yourself a cable that echo's everything.
if i connect a device will that respond to the code i have written
The device doesn't know about your code. Your code will have to speak to the device in a way that the device itself understands. Various devices use the serial port in different ways. Your micrologger will have some examples on this.