Export to Excel Alignment problem
Posted on 2004-09-02
I have a report composed of 5 columns namely:
AcctID and AcctDesc are declared inside a formula while the Balance1 and 2 are fields from the table. Total is a formula which is equal to Balance1 + Balance 2.
I can't combine AcctID and AcctDesc into one formula because AcctID will be displayed on a different color (blue) while the rest of the objects will be in black. Another thing is we have a function that once you double-click on AcctID (during preview), a report will be called which acts as something like a details info about the AcctID.
On the report interface (a VB6 form) we provided to let user select possible options, we have an option (checkbox) that will allow user to mark if he/she wants to display AcctID.
What I am doing was to overlap AcctID and AcctDesc (AcctDesc on top of AcctID). So that if checkbox is unmarked, AcctDesc will be alligned to the leftmost side of the paper. If checkbox is marked, AcctID will be on the leftmost and followed by the AcctDesc (I have some coding on the AcctDesc formula to somehow add few spaces so that it will look like they are not overlapping when you preview the report).
The report looks good when I preview and print it but if I export it to excel, Balance1, 2 and Total columns are not align with the column heading.
It seems that when you export a report with overlapping fields/formulas, crystal will try to allocate spaces for each overlapped objects. This will cause the total fields to be moved a column or 2 away.
I'm using cr10, VB6 and MSSQL 2000