Footer Rows doesn't honor BestFit |
Post Reply |
Author | |
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
Posted: 21 May 2008 at 10:10am |
Hi
I have sent 2 messages to issue track but got no answer (also no automated response?). So I ask forum:
If I set BestFitMode to honor all column widths, shown or not, this works fine for 'normal' rows, but footer row sizes would not be hored for calculating the column sizes.
Do I miss something?
Thanks for help
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Better check your code because columns do resize for footer rows also.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Hi Aaron
Thanks for your sample. It works because the first column with the long footer text was visible.
But look: If you set the long footer text ''This text is longer...' to the last column and fill the report control. Make the last column small. Adjust the column with of the first column so the last column totally vanishes. Then press your bestfit button, the whole column wasn't resized. Set Column.BestFitMode=xtpBestFitModeAlldata and repeat. The last column honors all 'normal' rows but not the long footer text.
So I came to the conclusion: BestFit doesn't honor BestFitMode=xtpBestFitModeAlldata
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
If you set the long text for the last column you have to set:
wndReportControlData.Columns(3).BestFitMode = xtpBestFitModeAllData
wndReportControlData.Columns(3).BestFit as well. I made the sample just to let you see it does work.
change this in the sample:
Private Sub Command3_Click()
Dim col As ReportColumn For Each col In wndReportControlData.Columns col.BestFitMode = xtpBestFitModeAllData col.BestFit DoEvents Next col End Sub Now all columns will call BestFit and not as in my first example with just the first column and if you set the longer text to another column it won't work
Change the above and see for yourself.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Hi Aaron
I had called the best fit method to column 3 and it won't work.
Your sample simply works because you use DoEvents in the loop. This is an old trick for the same problem with BestFit before .BestFitMode was introduced. But it does not always work. I am shure that for the footer rows the BestFitMode was not taken into account...
Thanks again
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Yes, I had to use DoEvents otherwise it did't work. But it shows that all columns will be resized, also the FooterRows and if you think that it doesn't work all the time, show me.
You say and I quote:
I am shure that for the footer rows the BestFitMode was not taken into account...
They have to be checked for the contents of the "cell" otherwise the columns wouldn't be resized, right? That we have to use DoEvents is another story...
I will wait for a few days and I will post an issue regarding the BestFit method (giving Oleg the time to reply on this post )
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Hi Aaron
Yes, but if BestFitMode is 0 or not taken into account only the width of visible cells are measured. So your sample works if you have long text in the first, visible column but not in the last, hidden row.
Why it works from time to time with DoEvents - no idea. In V11 before BestFitMode was introduced I also used DoEvents AND .Poulate but sometimes it works sometimes not - depends on Windows repainting (sizing, pane sizing, overlaping windows...).
But - thanks a lot, I hope Oleg have the time to examine this issue.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
With my sample it does not matter if xtpBestFitModeAllData or xtpBestFitModeVisibleData is set, it will always resize the long text and no matter where the column is and visible or not.
Please add code that it won't work. Convince me that this doesn't work
(I added the code where I loop through the columns)
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |