PDA

View Full Version : ReportControl FreezeColumnsCount



flado
22-Feb-2010, 09:50 AM
Hi all,

I am trying to add the property FreezeColumnsCount to the ReportControls I'm using but I can't get it to work. I'm using Codejock 13.2.1 and VDF14.

I set the property like this

Set ComFreezeColumnsCount to 2

in the OnCreate of the ReportControl. I set many other properties there, but this one is not working. Does anyone have any idea on how to use it?

BTW, very impressive work you guys have done with the SIG wrapper classes!

Thank you

/Leif Angestam

Nicole Wright
23-Feb-2010, 01:11 AM
in construct_object of the report control class
place


{ DesignTime=False }
Property Integer Private_piFreezeColumnsCount 0


add these methods to the class:



{ MethodType=Property }
Function piFreezeColumnsCount Returns Integer
Function_Return (Private_piFreezeColumnsCount(Self))
End_Function

{Category="CodeJock" MethodType=Property InitialValue=0 }
Procedure Set piFreezeColumnsCount Integer iCount
Set Private_piFreezeColumnsCount to iCount
End_Procedure


in Rebuild_report in the Class place:



//Freeze Columns
Set ComFreezeColumnsCount to (Private_piFreezeColumnsCount(Self))


also in the class add this augmentation:



Procedure OnComColumnOrderChangedEx Variant llColumn OLEXTPReportColumnOrderChangedReason llReason
Set ComFreezeColumnsCount to (Private_piFreezeColumnsCount(Self))
End_Procedure


Now in your report object just put along with the other report properties:



Set piFreezeColumnsCount to 2


Hope this helps

Nick

flado
24-Feb-2010, 05:54 AM
Thanks!
works perfectly!
/Leif