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!

extra empty column when exporting to MS Excel

Status
Not open for further replies.

lthomas6

MIS
Aug 22, 2007
87
0
0
US
I have a Crystal 10 report using SQL. For the extra spacing, I did the following and it worked for all columns except for one.
- all the headers and fields are the same height and are aligned at the top
-used guidelines to link column headers and fields together so there is no white space between them.

I have the extra space between the last 2 columns. One which is a database field and the other which is a formula.

Any suggestions on how to resolve this?

 
Hi,
Try usng a formula using the Trim() function on the database field and place that in the report instead of the field itself.

(The database may be padding to fill the defined length regardless of the actual data length)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I think you should test whether they are in fact attached to the vertical guidelines by moving the guidelines left and right. This really shouldn't happen if they are attached correctly.

-LB
 
lbass- they do move to the left and right this is why I don't understand why they are not working.

turbear - i tried that and it didn't help. It actually created 2 additional columns.

Any other suggestions?
 
Perhaps it may help if I state what the formula field contains.
It is as follows: @display =
whileprintingrecords;
stringvar x;
if len(x)>1 then
left(x,len(x)-1);
This is placed in the group footer.

In the details, there is another formula @accum =

whileprintingrecords;
stringvar x := x + {V_Custom_CorpTaxCode.owner_name} & " " &
(
if isnull({V_Custom_CorpTaxCode.ownercorptaxcode}) or {V_Custom_CorpTaxCode.ownercorptaxcode}= ' then
"" & ";" else
"(" & {V_Custom_CorpTaxCode.ownercorptaxcode} & ");"
)

It is placed in details and suppressed.

Then the last formula is called @reset = whileprintingrecords;
stringvar x:="";
it is placed in the group header which is suppressed.

 
When you export, make sure you are using the section where your fields are located for the column width. Also, make sure that column labels are ALSO attached to the same guidelines.

-LB
 
The column labels are attached to the same guidelines.
I am choosing all fields and column labels and setting to same height. Is there anything else I should be doing?
 
Even if section is suppressed Are all the Details fields attached to guides too?

Do you have any Header fields like Titles or dates. These should also be attcahed to guides otherwise they will introduce columns

When you export to Excel do you define which section should be used to determine Cell width?

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top