473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Crystal Reports - Excel Options when exporting

I am exporting a report to an Excel file. Whatever options I use for the
formatting the results remain the same. I have set the
ExcelTabHasColumnHeadings to true and false without any difference. I have
set the ExcelUseConstantColumnWidth to true and thenset the width to
different values and have seen no changes. The code I am using is shown below.

private void ExportToExcel
(CrystalDecisions.CrystalReports.Engine.ReportDocu ment Report, string
fileName, bool hasColumnHeaders, double columnWidth)
{
ExcelFormatOptions excelFormatOpts = new ExcelFormatOptions
();
DiskFileDestinationOptions diskOpts = new
DiskFileDestinationOptions();

// Set the excel format options.
excelFormatOpts.ExcelTabHasColumnHeadings = false;
excelFormatOpts.ExcelUseConstantColumnWidth = hasColumnHeaders;
excelFormatOpts.ExcelConstantColumnWidth = columnWidth;
Report.ExportOptions.ExportFormatType = ExportFormatType.Excel;
Report.ExportOptions.FormatOptions = excelFormatOpts;
// Set the disk file options and export.
Report.ExportOptions.ExportDestinationType =
ExportDestinationType.DiskFile;
diskOpts.DiskFileName = fileName;
Report.ExportOptions.DestinationOptions = diskOpts;
Report.Export ();
}
Thanks for any help

Jul 21 '05 #1
0 1964

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: LP | last post by:
Hi, I will be taking on a new project developing a web-based "reporting system". The first requirement I got from BI group is "we just want to look at the data". Basically, there is a huge...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: George G. | last post by:
I am exporting a report to an Excel file. Whatever options I use for the formatting the results remain the same. I have set the ExcelTabHasColumnHeadings to true and false without any difference. I...
0
by: Sheshadrinath R | last post by:
Hello, I have designed some Crystal Reports, in ASP.NET. I have also given provision for exporting the crystal reports to word, excel, and PDF. The crystal report shows the result as expected when...
1
by: Lyners | last post by:
Hello all, I have created an ASP.NET website that uses Crystal Reports that works on the localhost (my PC), but when I copy it to the server it does not. The problem is...
3
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.