Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal report & Resizing column width while runtime ?

Status
Not open for further replies.

WFadloun

Programmer
Aug 18, 2003
42
AE
hello all

is there a way to resize column width for multiple_columns crystal report in runtime.

I am requesting that to give user an option to choose number of Printed columns per row.

I am using Crystal report desinger components

thanx in advance
 
Hi, WFadloun!
I have the similar problem and I didn't find the way to do that in run time. If you find a resolution, please, notify me too.

Thanks in advance
 
Each FieldObject has a Width property. To manipulate it at runtime, you'd change the width of the field in the Format event of a Section object.

-dave
 
hello dave
thanx for reply

I have tried to get column width (just read it) but I couldn't do that.
I couldn't find column object in report properties.
could you tell me how to do it (read & write column object width)

regards
 
You have a FieldObject located in the details section that repeats and creates columns. That field object has a Width Property and as vidru says go to the Detail section format event and set the field object to the new width.


Private Sub Section3_Format(ByVal pFormattingInfo As Object)
Field1.width = 500
End Sub


"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
hi
DrJavaloe
thx for reply

I have tried to resize column width by set new width value for field object but that doesn't make any effect to column width.
setting column width in design time is not related to field obj width ,,, normally this property is located in layout tab in section format dialoge box.

regards
 
What version of Crystal Reports are you using and are you using the RDC?

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Ok, I think you're talking about a report using multiple columns, and you want to change the width of the "columns".

In reports utilizing the multiple columns feature, the Details section(s) get(s) resized based on your settings (the Layout tab). Unfortunately, you can't set the Width of a Section at runtime (it's read only).

To get a nice overview of the CRAXDRT Object Model, I suggest you download the RDC Browser Utility:

For CR 6 and 7:
For CR 8 and 8.5:
For CR 9:
-dave
 
Hellooo

DrJavaloe
yes I am using RDC.and my CR version is 8.5

Virdu
thanx for good referance you mentoined to.
yes you are right Column width is a read only property and could be set only in design time.
I don't know if this property became a read-write in latest version of CR.

I am gonna to work around this problem by give the user a limited options when selecting column numbers 2,3 or 4 and create a report for each option.

thanx all
regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top