Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-27
6
Medium Priority
?
642 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
5 Comments
 
LVL 101

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

877 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