Link to home
Start Free TrialLog in
Avatar of SimonWillis
SimonWillis

asked on

Can Grow Field and Font Size Problem

I have a VB6 App in which I am using Designers to Produce Reports. In the Detail Section of one of the reports I am setting the Font name and Font Size of a number of Fields
dynamically. The majority of these fields are then being shown correctly (i.e) with the correct font.

My problem however is that I have one Field which has the 'Can Grow' property set to true and this field ignores any changes to the Size of the Font. Unfortunately this field has to be able to grow otherwise the report will not work.

Can anybody provide me with a work around for this problem please ?
Avatar of Mike McCracken
Mike McCracken

What code are you using to produce/print the report?

mlmcc
Avatar of SimonWillis

ASKER

I am using Crystal Reports V8, however the last article that you included sounds very much like the problem I am getting.

In the detail section of the report I reference the fields font property directly. ie.


Field1.Font.Size=12

this really is the crux of the problem. when I change the can grow option to false then the font size does change, otherwise nothing happens.
I'm not sure if this is the case with Crystal Reports, though I've used the Excel Automation objects with VB to format cells, and found that sometimes the order of the commands makes a difference.  You might try the Font Size change before and after the other command.

Good Luck.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the info, I have used the runtime library a couple of times for proof of concept but I didn't really want to go down tha route due to the licensing restrictions.

I tried stripping everything out of the except the font statements and I still get the problem i.e.

Private Sub Section3_Format(ByVal pFormattingInfo As Object)
' Detail Section
fldName.Font.Size = 14

End Sub

but the problem still occurrs when cangrow is set.

It may be that this is a known bug in Crystal reports 8 as well as CR.NET. If so then I may have to chat with crystal decisions about some kind of workaround.
Thanks, I have about as much info as I could get now. Cheers !