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.
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.
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.
I realize I am using a very outdated version of Crystal Reports. I hope this is something they have fixed in future versions.
Friday, February 6, 2009
Bool/Bit - C#-TSQL(SQL Server)
When passing a parameter to a SQL Server stored procedure using C# you cannot pass 0 or 1 like you would manually calling an EXEC on he procedure.
I passed a parameter as a zero and it acted like I had passed a 1 or true. I switched it to false and it ran as it was supposed to.
I passed a parameter as a zero and it acted like I had passed a 1 or true. I switched it to false and it ran as it was supposed to.
Thursday, July 31, 2008
TSQL Drop Table If Exists
Using SQL Server I have needed to drop functions and stored procedures before creating them in a script. Today I had to drop a table. After searching around a bit I found that I could test if the drop was necessary using much the same syntax as the others.
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TableName]') AND type in (N'U'))
DROP TABLE [dbo].[TableName]
The type of the object is U for USER_TABLE.
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TableName]') AND type in (N'U'))
DROP TABLE [dbo].[TableName]
The type of the object is U for USER_TABLE.
Thursday, June 5, 2008
Assigning Variables Values in SQL Server TSQL
This trips me up every now and again as I switch between coding SQL and coding other things.
The keyword SET is required before a variable assignment. I see to recall that BASIC use to have this requirement as well.
Example:
DECLARE @myInteger INT
SET @myInteger = 7
The keyword SET is required before a variable assignment. I see to recall that BASIC use to have this requirement as well.
Example:
DECLARE @myInteger INT
SET @myInteger = 7
Friday, April 18, 2008
Statements can only be used fo calls, assignments...
This C# error probably means that you have tried to call a function without parethesis after it. For example, typing:
GetTaxes;
Instead of:
GetTaxes();
GetTaxes;
Instead of:
GetTaxes();
Subscribe to:
Posts (Atom)