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

Row width autosize in crosstab?

Status
Not open for further replies.

MSBrady

Technical User
Mar 1, 2005
147
0
0
US
CR 10
SQL Server 2005

Oy!

I have a crosstab report that has data fields that vary in length depending on options the user selects at runtime. I need to see if there is any way to get the crosstab rows to size themselves according to the length of the field.
The choices the user has are (Description, Code, Both).
Code - BBC
Description - Britsh Broadcasting Company
Both BBC - Britsh Broadcasting Company

It looks weird to see 2 inches of space for BBC because I had to size for the largest result possible.

TIA

Brady
 
You could conditionally change the font size, so that longer entries are in a smaller font, or you could change the height so that the field can wrap, which may be more visually appealing, although again it create unnecessary white space. In your case you might want to set the font size based on the selected parameter option.

-LB
 
Thanks LB.

I tried that and I see what you're talking about. The unnecessary space is not acceptable to the client.

Any other suggestions?
 
Tried which? There were two suggestions. I think conditionally changing the font size is probably the best option. I have no other suggestions.

-LB
 
I tried the font size suggestion.

Anyone else have an idea?
 
I don't think 'autosize' is an option in Crystal. You could export the data to some function that would. Maybe Excel with 'Word Wrap'. Or you might need to export to Word (which puts things in text boxes and is awkward to edit.

Or if there are a fixed number of column values, you could do a mock-crosstab. This is something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. This would need to go in the report footer, because running totals count as the reports 'run' and they will not be complete until then. Crystal should have included an example along with the Crosstabs.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top