Friday, August 20, 2010

ActiveX UltraGrid Not Sorting With More Than 1000 Rows

I am using an ActiveX UltraGrid on a Visual Basic 6 (VB6) form.  I was having problems with it not sorting.  I researched it for a long time and found that if you have more than 1000 rows the grid will not sort with the default settings.  I had to change the FetchRows property to 3-ssFetchRowsPreloadWithSiblings.

This property is a little tricky to find.  It is on the Categorized tab of the Property Page.  On that tab there is an expandable item called Behavior.  Expand that item and there will be another expandable item called Override.  Expand Override and the FetchRows property is under there.  I changed this property to 3-ssFetchRowsPreloadWithSiblings and it allowed the grid to sort.


Wednesday, July 21, 2010

Crystal Report "report" showing just 19 pages (out of 43 pages)

An old friend of mine was having some trouble with Visual Basic 6 and Crystal reports.  Here is what he told me his problem was and the solution he found.

A ticket was assigned to me to look at a report that was not displaying all the data. The report displayed just 19 pages. The user said he/she was expecting around 40 pages…. After hours of trying different things I found the problem….

·         The Report had a sub-report
·         The 19 pages represented the main report
·         The sub-report was not showing because the VB6 code is dynamically creating SQL that is passed to the report. It just happened that when one of the parameters (user entered thru the UI) was 0 (zero)
·         The VB6 code was doing Format$(USER_PARAMETER, "######") this caused the value to be empty
·         Solution Format$(USER_PARAMETER, "#####0")

Friday, February 19, 2010

Field Order TTX file fields Crystal Reports 9

I ran into a problem when I changed the order of the fields in the TTX file.  I was changing the order of the fields to try to get the verify database command in Crystal Reports 9 to recognize that I had changed the file.  At times it seems to take lots of monkeying around to get Crystal to wake up and see the changes.  I did not change the order of the fields in the recordset I was binding to the report.  Crystal ended up showing me the version of the report as it looks in preview mode with no data.  After a while of digging through my code and the report I happened to think about the messing with the TTX file I had done.  I made the field order in the file match the recordset and everything began to work again.

I realize I am using a very outdated version of Crystal Reports.  I hope this is something they have fixed in future versions.