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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HowTo dynamically set column caption

Status
Not open for further replies.

amasny

Programmer
Oct 6, 2003
20
PL
I would like to ask if it is possible to set dynamically column caption. E.g. i would like to make report which will compute some things for three months choosen by user. I would like to display these months as column captions.
Thanks in advance
 
You can use the formulas feature available in Crystal. Set the formulas as Column Captions and change them accoriding to your need.

Cheers
RCM
 
Thank you "rchandr3". I'm just beginner.
 
If you are using a string parameter {?Month} with multiple, discrete values, you can create a formula for each column:

//{@col1}:
{?Month}[1]

//{@col2}:
{?Month}[2] //etc.

If the selections are entered as January and May, these will appear as the column headings.

-LB
 
If it's possible to calculate what the column heading should be, based perhaps on data elements in the resultset that you're reporting on, then use a formula field in your report.

If it's not possible to derive the column heading in your report (perhaps because there's too many heading values that could be displayed) then I would pass the column heading in as a parameter to the report and let my calling process (VB or ASP application) decide what the column heading should be. You can then use the value of the parameter as your column heading.

Hope this helps.

Rob C-W
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top