Solved

Exporting in Excel with column width based on details (CR10)

Posted on 2006-11-27
6
609 Views
Last Modified: 2008-01-09
I'm trying to export my reports in Excel format using the CR10 version
with the "Column width based on objects in the Details" option.

I've been able to do it in CR11, but for some reasons I am restricted
to use CR10 in that project.

Working in CR11 (note code is in c#, hoping it's no problem):

ReportClientDocument crReportDocument;
crReportDocument = new ReportClientDocument();
crReportDocument.ReportAppServer = ConfigurationSettings.AppSettings["RASServer"];
filename = "rassdk://" + this.m_applicationPath + Reports\\" + this.m_ReportFile;
crReportDocument.Open( ref filename, 1 );
SetFormulaFields( crReportDocument );
crReportDocument.DatabaseController.SetDataSource(DataSetConverter.Convert(ds),crReportDocument.Database.Tables[0].Alias, ds.Tables[0].TableName );
PrintOutputController ctrl = crReportDocument.PrintOutputController;
CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray byteArray = null;

ExcelExportFormatOptions excelOptions = new ExcelExportFormatOptions();
excelOptions.BaseAreaType = CrAreaSectionKindEnum.crAreaSectionKindDetail;
ExportOptions exportExcel = new ExportOptions();
exportExcel.ExportFormatType= ReportExportFormatEnum.crReportExportFormatMSExcel
exportExcel.FormatOptions = excelOptions;
byteArray = ctrl.ExportEx(exportExcel);

CR10:

There is no ExportEx method attached to the PrintOutputController
object. I am using

byteArray = ctrl.Export(CrReportExportFormatEnum.crReportExportFormatMSExcel, 1);

Anybody has an idea on how to set the excel options in CR10 like we can do in CR11?

Thanks!
0
Comment
Question by:npelletier
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 18022385
Here are some samples for CR9 they should work with CR10 http://support.businessobjects.com/communityCS/FilesAndUpdates/vbnet_win_samples.exe.asp

mlmcc
0
 
LVL 42

Expert Comment

by:frodoman
ID: 18024034
0
 

Author Comment

by:npelletier
ID: 18027931
Thank you for your responses.

We finally have to opportunity to deploy the RAS for CR11 and are currently testing it.  If it's OK, that will solve this issue.

I will keep you posted.

Npelletier
0
 

Author Comment

by:npelletier
ID: 18139859
Thank you all for your help.  We deployed the RAS for CR11 and it's working OK.  Still didn't worked before with CR10 solution....
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 18221880
PAQd, 250 points refunded.

DarthMod
CS Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now