Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-27
6
Medium Priority
?
637 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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 …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

705 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