473,703 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ExcelUseConstan tColumnWidth 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 ExcelUseConstan tColumnWidth = 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( "/") &
ConfigurationSe ttings.AppSetti ngs("ExportDir" ) & Session.Session ID & ".xls"
Case "PDF"
ExportFileName = Server.MapPath( "/") &
ConfigurationSe ttings.AppSetti ngs("ExportDir" ) & Session.Session ID & ".pdf"
End Select
Try
oRpt.ExportOpti ons.ExportDesti nationType =
CrystalDecision s.[Shared].ExportDestinat ionType.DiskFil e
Select Case oExportType
Case "Excel"
Dim objExcelOptions As ExcelFormatOpti ons = New
CrystalDecision s.[Shared].ExcelFormatOpt ions
objExcelOptions .ExcelUseConsta ntColumnWidth = False
oRpt.ExportOpti ons.ExportForma tType =
CrystalDecision s.[Shared].ExportFormatTy pe.Excel
oRpt.ExportOpti ons.FormatOptio ns = objExcelOptions
Case "PDF"
oRpt.ExportOpti ons.ExportForma tType =
CrystalDecision s.[Shared].ExportFormatTy pe.PortableDocF ormat
End Select
oDest.DiskFileN ame = ExportFileName
oRpt.ExportOpti ons.Destination Options = 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 4312
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_MACH INE\SOFTWARE\Cr ystal Decisions\9.0\C rystal Reports\Export]

[HKEY_LOCAL_MACH INE\SOFTWARE\Cr ystal Decisions\9.0\C rystal
Reports\Export\ Crxf_xls]
"ColumnWidthBas eArea"=dword:00 0000ff
"ColumnWidthGro upNumber"=dword :00000001
"UseConstantCol umnWidth"="Fals e"
"ConstantColumn Width"=dword:00 0002d0
"ShowGridLines" ="No"

[HKEY_LOCAL_MACH INE\SOFTWARE\Cr ystal Decisions\9.0\C rystal Reports\Export\ CSV]
"AreaExportOpti ons"=dword:0000 0000

[HKEY_LOCAL_MACH INE\SOFTWARE\Cr ystal Decisions\9.0\C rystal
Reports\Export\ HTML]
"EncodeHTMLForS ingleLineFieldO bjects"="Yes"

[HKEY_LOCAL_MACH INE\SOFTWARE\Cr ystal Decisions\9.0\C rystal
Reports\Export\ TextExport]
"CharPerInch"=d word: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 ExcelUseConstan tColumnWidth = 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( "/") &
ConfigurationSe ttings.AppSetti ngs("ExportDir" ) & Session.Session ID & ".xls"
Case "PDF"
ExportFileName = Server.MapPath( "/") &
ConfigurationSe ttings.AppSetti ngs("ExportDir" ) & Session.Session ID & ".pdf"
End Select
Try
oRpt.ExportOpti ons.ExportDesti nationType =
CrystalDecision s.[Shared].ExportDestinat ionType.DiskFil e
Select Case oExportType
Case "Excel"
Dim objExcelOptions As ExcelFormatOpti ons = New
CrystalDecision s.[Shared].ExcelFormatOpt ions
objExcelOptions .ExcelUseConsta ntColumnWidth = False
oRpt.ExportOpti ons.ExportForma tType =
CrystalDecision s.[Shared].ExportFormatTy pe.Excel
oRpt.ExportOpti ons.FormatOptio ns = objExcelOptions
Case "PDF"
oRpt.ExportOpti ons.ExportForma tType =
CrystalDecision s.[Shared].ExportFormatTy pe.PortableDocF ormat
End Select
oDest.DiskFileN ame = ExportFileName
oRpt.ExportOpti ons.Destination Options = 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
5990
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 VisualStudio.NET). Also the Crsyatl Report software 8.5 version will not be installed in the IIS web server which is hosting my ASP.NET web application. It will be installed in a different server which has .net and IIS 5.0.
3
6915
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
2197
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 database, and they want certain people to be able to drill down to the data they want, perhaps a few graphs here and there, and then extract selected data to an Excel file or a flat file for further analysis. As of now there are a handful of parameters...
2
5041
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 server at the client place, the server does not have visual studio.Net installed. But .Net framework is installed on the server. The entire application runs fine except crystal reports.Crystal reports are giving error. Do i need to have visual...
7
5014
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. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
17
8445
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 using crystal reports 9 and vb.net and we're using the crystalrepotViewer to show our reports. But every time we open a report the connection to or sql server remains, so if I open 5 forms with the report viewer I've got 5 sleeping connections in...
4
21501
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 the site to our production server - as soon as we visit the site to test it we get a horrible message from crysta reports that we just dont understand as below ========================================================================== Configuration...
2
8987
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 wondering is there a crystal report installation that needs to be done on the server? vs.net is not installed on the server, just the framework. thanks. -- Paul G Software engineer.
0
9251
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9121
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6588
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3123
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2450
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2069
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.