Closed liufeijin closed 2 years ago
Hi! You can use something like this
Reportpage1_DataBand1.setItemHeight(Reportpage1_DataBand1.geometry.height/10+10)
hi fralx Many thanks , i will have a try
seems the height is not correct
when i used
CLKHPg9T_DataFooterBand1.beforeRender.connect(Pg9T)
function Pg9T(){
CLKHPg9T_TextItem9.setItemHeight(195-CLKHPg9_DataBand1.geometry.height/10);
}
I want the height of Textitem9 in DataFooterBand1 is follow up the height of DataBand1. but got the height is small
I want the height of Textitem9 in DataFooterBand1 is follow up the height of DataBand1.
You can use stretchToMaxHeight property for this
but got the height is small
I have tested it and for me, it works as expected :)
Hi fralx I still can get the expected result. I see your demo. the databand is fixed, but in my report the databand is set to 5mm and TextItem set to 95mm. if database has 19 rows then filling 19 rows into databand, the hight of databand will be change to 95,Textitem will be changed to 5mm. maybe get the height of banddata is not the after changed size?
Could you send me example?
let rowsHeight = 0
Reportpage1_DataBand1.afterRender.connect(ar)
Reportpage1_DataFooterBand6.beforeRender.connect(rr)
function ar(){
rowsHeight += Reportpage1_DataBand1.geometry.height
}
function rr(){
Reportpage1_DataFooterBand6.setItemHeight(253-rowsHeight/10.0);
Reportpage1_TextItem6.setItemHeight(248-rowsHeight/10.0);
}
I think this will help you :)
Hi fralx Many thanks for your help! It is ok now! BTW, the hotfix1.6.0 for pages order is ok also. you can merge it to master.
Hi fralx Is there any way to get and change height of databand in QT app or script?
I found it that use "setItemHeight" to change height of item. But, i still don't know how to get the height of items. i tried DataBand1.geometry.Height , but nothing is present.