Data Report and fonts

Andy Lawrence
12-17-2003, 08:23 AM
I'm using vb6 and the standard Data report designer.

I can't seem to change the fonts programmatically. Either I'm missing something or there are some constraints that I don't know about!

when I use the following code:

dr.Sections("pageHeader").Controls("phlbl1").Font.Size = 8
dr.Sections("pageHeader").Controls("phlbl2").Font.Size = 12
dr.Sections("reportheader").Controls("rhlbl1").Font.Size = 14

(dr is the name of the data report)

and step through it, it seems to set all fonts to the value of the last entry. So in this case if I look do the following in the immediate (straight after executing the last statement)

?dr.Sections("pageHeader").Controls("phlbl1").Font.Size
it displays 14
it does the same if I display dr.Sections("pageHeader").Controls("phlbl2").Font.Size

am I missing something?

N.B The real code was a lot longer but the above demonstrates the problem...

Dennis DVR
12-17-2003, 08:33 AM
I'm using vb6 and the standard Data report designer.

I can't seem to change the fonts programmatically. Either I'm missing something or there are some constraints that I don't know about!

when I use the following code:

dr.Sections("pageHeader").Controls("phlbl1").Font.Size = 8
dr.Sections("pageHeader").Controls("phlbl2").Font.Size = 12
dr.Sections("reportheader").Controls("rhlbl1").Font.Size = 14

(dr is the name of the data report)

and step through it, it seems to set all fonts to the value of the last entry. So in this case if I look do the following in the immediate (straight after executing the last statement)

?dr.Sections("pageHeader").Controls("phlbl1").Font.Size
it displays 14
it does the same if I display dr.Sections("pageHeader").Controls("phlbl2").Font.Size

am I missing something?

N.B The real code was a lot longer but the above demonstrates the problem...

it seems that your manipulating the label control on datareport programmatically
does label control has a refresh method if it does try refreshing the control.

Andy Lawrence
12-17-2003, 09:34 AM
I don't think refreshing it is helping. The control seems to get the data straight away, but so do all the other controls!

There doesn't seem to be a refresh for the individual controls, and refreshing the whole report doesn't have the desired effect.

I'm trying to write an extensible framework, so manipulating the controls is key.

Anyone any other ideas?

Andy

Dennis DVR
12-17-2003, 09:53 AM
I don't think refreshing it is helping. The control seems to get the data straight away, but so do all the other controls!

There doesn't seem to be a refresh for the individual controls, and refreshing the whole report doesn't have the desired effect.

I'm trying to write an extensible framework, so manipulating the controls is key.

Anyone any other ideas?

Andy

try to modify the label at designtime before changing its behaviour at runtime what i mean is goto your datareport then change the font size to 9 of your label just don't use the default font size.

give it a try

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum