TfrxCrossView Align baCenter issue
Hi,
I've checked the forums and documentation for any special steps regarding the alignment of a TfrxCrossView component which is filled with data during runtime.
When I set the Align property to baCenter it aligns the component based on the original width prior to it being populated with data. The attached docs displays the behaviour I am experiencing. I can understand why it's happening but need to 'refresh' the alignment after the data has been added.
I have tried setting the Align property on various events within the Script e.g. Cross1OnAfterPrint(), Cross1OnBeforePrint(), Cross1OnCalcWidth(), Cross1OnAfterData()
I have also tried setting the property on the 2nd pass within my code e.g. frxReport1BeforePrint() -> IsFinalPass()
Thanks in advance for your help
I've checked the forums and documentation for any special steps regarding the alignment of a TfrxCrossView component which is filled with data during runtime.
When I set the Align property to baCenter it aligns the component based on the original width prior to it being populated with data. The attached docs displays the behaviour I am experiencing. I can understand why it's happening but need to 'refresh' the alignment after the data has been added.
I have tried setting the Align property on various events within the Script e.g. Cross1OnAfterPrint(), Cross1OnBeforePrint(), Cross1OnCalcWidth(), Cross1OnAfterData()
I have also tried setting the property on the 2nd pass within my code e.g. frxReport1BeforePrint() -> IsFinalPass()
Thanks in advance for your help
Comments
Have a look at the code below and if you find it interesting then follow the idea I tested.
Mick
Thanks for the suggestion, however it appears that the Width parameter of Cross1OnCalcWidth() is based on a width value before the cols are autosized. When I tested your suggestion the Width value was always 200 which I know is not the true width as the column widths are all different i.e. autosize.
One thing I must emphasize is that I am using the CrossView component (not DBCrossView) and populating the values within frxReport1BeforePrint in my own code. Could it be possible to calculate the Left position after a IsFinalPass() check within the frxReport1BeforePrint function i.e. once the data has already been added.
Any other suggestions greatly appreciated.
D'Arcy
Did anyone get a chance to consider my reply. Unfortunately this is still an issue.
Kind regards,
D'Arcy