Knowledge Base

You are currently browsing the articles from Information City matching the category Knowledge Base.

ReportViewer export to Excel: Data Regions within table/matrix cells are ignored.

Having some issues in the exported excel format. As there is a requirement from the client to add new row manually, the column wasn’t in the correct format. Thus, I thought of an idea to use a table inside another table to make the field more organized. But trying to do so causes another error.

Without further ado, checking from the internet shows that this error is a known error using table inside table for Reportviewer in exporting to Microsoft Excel. Just for sharing for those who faces this error.

Written by admin on July 7th, 2010 with no comments.
Read more articles on Entertainment and Knowledge Base and Programming.

Dataset shows error: “Failed to convert parameters to Byte[]“

This error prompted when I tried to preview the data of the query I added for the dataset. The query is designed to accept a parameter which would check for the value on one of the field. Theoretically, the query should works as it is but the error “failed to convert parameter value from a string to byte[]” shows. Trying to input the parameter by running the query builder prompted below:

“Invalid value for cell (row 1, column 2).

The changed value in this cell was not recognized as valid.
.Net Framework Data Type: Byte[]
Error Message: You cannot use the Result pane to set this Field data to values other than NULL.

Type a value appropriate for the data type or press ESC to cancel the change.”

This has kept me puzzled for sometime and searching around the internet to no avail. I resorted to re-create the dataset and add back the query which surprisingly resolves the problem!

It sounds weird but that’s how it have drain down my time!

Written by admin on July 7th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.

Disable (double click) Windows title bar sizing

While developing one of the apps. for demo on a touchscreen device, it came to surprise on the application windows sizing function. I have set the formborderstyle to fixedsingle in hope to disable the application from resize but it seems that it was able to shrink/un-maximize from maximized application. I tried playing around with the values in the window properties but to no avail.

I search around the net and found an interesting code snippet posted on Microsoft community newsgroup (idea originates from the MVP, Herfried K. Wagner):

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WM_NCLBUTTONDBLCLK As Int32 = &HA3
If m.Msg = WM_NCLBUTTONDBLCLK Then
Exit Sub
End If
MyBase.WndProc(m)
End Sub

Having that codes in the winforms disabled the window resizing on double clicking of the title bar. Great one!

Written by admin on May 12th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.

« Older articles

No newer articles