bttds
Posts
-
Crystal report display problem -
Crysta report helpI'm developing a windows application in C# with crystal reports. In one of my reports I deisplay passenger list comes by cruises. I group it by cruise no. I want to display group footer with total no of passengers by their nationality and grand total, something like this, Malaysia 10 Singapore 15 Thailand 10 Total 35 and I need to do the same thing at the report footer as well with totals of groups. Can anybody tell me how to do it.
-
How to create the DataGridViewLinkColumn -
want to change startup form in windows applicationGo to Program.cs and change the form
-
Session like variablesYou can use public variables in this manner, public static class Global { public static string fromForm; } you can assign a value to fromForm variable in form1 and you can use it in form2 another way is declare public variable in form2 and pass a value to form2 as a parameter when you call form2 from form1 -- modified at 2:01 Thursday 27th September, 2007
-
ColumnHeaderMouseDoubleClick eventYour question is not very clear to me. If you want to do something when you double click on a cell (and avoid doing anything if the user double clik on the header) you can do something like this, private void gvList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int miHitRow = Convert.ToInt32(e.RowIndex); if (miHitRow < 0) return; //your code }
-
Crystal report display problemI'm developing a windows application in C# .net 2005 with crystal reports. I'm having problems desplaying the report. Is there any place that I can set the default size of the report to A4 independent of the printer. If I provide a valid printer that set the paper size to A4 then the report appears fine when I run the app and open a report. But If I dont have a printer installed for reports(A4) and have other printers installed (with different paper size) then the report not showing properly. Even if I set no printer, in printer setting option It takes the paper size of the default printer in the machine. I cant just change the paper size to A4. I want to open my report as A4 when I don't have a report printer in the machine. Can anybody help me.
-
printing encrypted byte array to a barcode and scanyes, the printer doesn't seems like accepting some characters. I've solved the problem by using different encryption/decryption method with no overhead (abandon the dot net cryptoservice ). Thanks alot for your comments. they help me to find the correct path.
-
send byte array to a printer and reading back through a serial portI'm using a "metrologic" scaning device to scan and "SATO" printer to printing. I don't think my problem is related to the device. My barcode is a 2D barcode. When I pass the data as string everything works fine there, when I scan the data I removed those linefeeds and carriage returns. But with the array with the way I'm reading it cant remove those linefeeds and ciarrage returns.
-
send byte array to a printer and reading back through a serial portI'm using a windows application (c#.net 2005). My byte array values are like this, 164, 243, 37, 108, ... valeus in returned array are almost same order. but values 10 and 13 in original array are moved to the end. but still mising 3 bytes. when I try with different initial string sometimes i get the exact number of bytes, but still values 10 and 13 in original array are moved to the end. so the decrypted string is different than original string for that one also. eg. original - "1000172;1;PUAY KEE;ANBRTYUIJh JGFT;10041946;SG;M;S1254743J;SG;11091988;11092010;SG" result - "1000172;1;PUAY K|jj[8�C\b@\"|�2��DS�@\af#�ݧ`-�6�?�T����'k�\akE�;�W��A��1\b�+�`l�E���r"
-
send byte array to a printer and reading back through a serial portI need to print encrypted customer details as a barcode. then need to scan the data and read back the details. My approch is like this, I encrypted the string data using cryptoservices and get memory stream and sen the byte array data as unmanaged byte arra to the printer. Byte[] bytes = memoryStream.GetBuffer(); IntPtr pUnmanagedBytes = new IntPtr(0); int nLength; nLength = Convert.ToInt32(memoryStream.Length); pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength); Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength); PrintDirect.WritePrinter1(lhPrinter, pUnmanagedBytes, nLength, out pcWritten); When I try to read the barcode through a serial port my byte array size is smaller int bytes = comport.BytesToRead; byte[] buffer = new byte[bytes]; comport.Read(buffer, 0, bytes); I've send 184 bytes to the printer. but now my buffer size is 181 can anybody help me
-
printing encrypted byte array to a barcode and scaneverything works fine if I send my data as a string (print the barcode and read it back). Problem occures when I print it as an unmanaged byte array. Is there any way that I can send byte by byte to the printer and when scan it read byte by byte. Can anybody help me.
-
printing encrypted byte array to a barcode and scanPrintDirect.writePrinter - normal pront command to write data to the printer. Theres a scan divice configured to a com port to scan the barcode. When i scan the barcode I need to read that data (that I send as unmanaged byte array to the printer). and decrypt it and get the initial customer details.
-
printing encrypted byte array to a barcode and scanI need to print encrypted customer details as a barcode. then need to scan the data and read back the details. My approch is like this, I encrypted the string data using cryptoservices and get memory stream and sen the byte array data as unmanaged byte arra to the printer. Byte[] bytes = memoryStream.GetBuffer(); IntPtr pUnmanagedBytes = new IntPtr(0); int nLength; nLength = Convert.ToInt32(memoryStream.Length); pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength); Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength); PrintDirect.WritePrinter1(lhPrinter, pUnmanagedBytes, nLength, out pcWritten); How can I read this data back to managed byte array from the scan device. (BTW am I in the correct path.)
-
byte array conversionwhen I use base64 its working fine. But i want to optimise the space taken by the barcode. I tried hex conversion and that also works fine. and then the size of the barcode is smaller. I want to make it much smaller.
-
byte array conversionFrom a windows application form I need to print a ticket from a special ticket printer. that ticket includes a 2D barcode which is a string of all the information about a customer. I need to encrypt it and get as a byte array so I use Cryptoservices and done that. to concatenate that data with other data I've done something like this System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string str = System.Text.Encoding.ASCII.GetString(b); So printing part is working fine. But when I scan the barcode and try to get it back to byte array like this, byte[] b = System.Text.Encoding.ASCII.GetBytes(data); Then my array size gets smaller and when I try to decrypt it it throws an error saying that invalid length of string. can anybody help me.