472,959 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

ExcelUseConstantColumnWidth and Crystal Reports from server not wo

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 ExcelUseConstantColumnWidth = False.

On my PC when exporting a report, it works - columns are varible width to
fit the field, from the server it does not - I get constant width columns. I
suspect it is a DLL issue, but so far all my comparisons are coming out the
same.

Here is my code to export the report;

Select Case oExportType
Case "Excel"
ExportFileName = Server.MapPath("/") &
ConfigurationSettings.AppSettings("ExportDir") & Session.SessionID & ".xls"
Case "PDF"
ExportFileName = Server.MapPath("/") &
ConfigurationSettings.AppSettings("ExportDir") & Session.SessionID & ".pdf"
End Select
Try
oRpt.ExportOptions.ExportDestinationType =
CrystalDecisions.[Shared].ExportDestinationType.DiskFile
Select Case oExportType
Case "Excel"
Dim objExcelOptions As ExcelFormatOptions = New
CrystalDecisions.[Shared].ExcelFormatOptions
objExcelOptions.ExcelUseConstantColumnWidth = False
oRpt.ExportOptions.ExportFormatType =
CrystalDecisions.[Shared].ExportFormatType.Excel
oRpt.ExportOptions.FormatOptions = objExcelOptions
Case "PDF"
oRpt.ExportOptions.ExportFormatType =
CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End Select
oDest.DiskFileName = ExportFileName
oRpt.ExportOptions.DestinationOptions = oDest
oRpt.Export()
'Send the file to the user that made the request
Response.Clear()
Response.Buffer = True

Can anyone shed some light on why this would work differently from the
server than my PC and how I should go about trying to fix it?

Thank you,
Lyners
Mar 30 '06 #1
1 4226
I have figured out my problem. On the server, Key registry entries were
missing, once I added them, the application worked fine.

Here were my extra registry entries:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal Reports\Export]

[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal
Reports\Export\Crxf_xls]
"ColumnWidthBaseArea"=dword:000000ff
"ColumnWidthGroupNumber"=dword:00000001
"UseConstantColumnWidth"="False"
"ConstantColumnWidth"=dword:000002d0
"ShowGridLines"="No"

[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal Reports\Export\CSV]
"AreaExportOptions"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal
Reports\Export\HTML]
"EncodeHTMLForSingleLineFieldObjects"="Yes"

[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal
Reports\Export\TextExport]
"CharPerInch"=dword:00000009
"Lyners" wrote:
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 ExcelUseConstantColumnWidth = False.

On my PC when exporting a report, it works - columns are varible width to
fit the field, from the server it does not - I get constant width columns. I
suspect it is a DLL issue, but so far all my comparisons are coming out the
same.

Here is my code to export the report;

Select Case oExportType
Case "Excel"
ExportFileName = Server.MapPath("/") &
ConfigurationSettings.AppSettings("ExportDir") & Session.SessionID & ".xls"
Case "PDF"
ExportFileName = Server.MapPath("/") &
ConfigurationSettings.AppSettings("ExportDir") & Session.SessionID & ".pdf"
End Select
Try
oRpt.ExportOptions.ExportDestinationType =
CrystalDecisions.[Shared].ExportDestinationType.DiskFile
Select Case oExportType
Case "Excel"
Dim objExcelOptions As ExcelFormatOptions = New
CrystalDecisions.[Shared].ExcelFormatOptions
objExcelOptions.ExcelUseConstantColumnWidth = False
oRpt.ExportOptions.ExportFormatType =
CrystalDecisions.[Shared].ExportFormatType.Excel
oRpt.ExportOptions.FormatOptions = objExcelOptions
Case "PDF"
oRpt.ExportOptions.ExportFormatType =
CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End Select
oDest.DiskFileName = ExportFileName
oRpt.ExportOptions.DestinationOptions = oDest
oRpt.Export()
'Send the file to the user that made the request
Response.Clear()
Response.Buffer = True

Can anyone shed some light on why this would work differently from the
server than my PC and how I should go about trying to fix it?

Thank you,
Lyners

Mar 31 '06 #2

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

Similar topics

1
by: rAGHU | last post by:
Hi, In my ASP.NET web application project we need to design crystal reports with Crystal Reports version 8.5 enterpraise edition(Please Note:It is not the Crystal Reports that comes with...
3
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
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...
2
by: SivaKumar | last post by:
Hi All, I have developed a web application using ASP.NET which contains crystal reports. The reports are running fine on my development machine.When i deployed my application on the production...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
4
by: Mike | last post by:
Hi We are developing an ASP.NET 2.0 application and using the in built Crystal report system that it comes with. We have everything running fine on our development server but when we publish...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I am running .net framwork 2.0 on a server and after installing a web ap that has crystal reports in it there is an error, cant find crystal report dlls that are in the web.config file. Just...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.