Solved

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

Posted on 2006-11-27
6
624 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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