473,850 Members | 2,058 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 4323
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
5999
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
6921
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
2216
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
5046
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
5039
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
8463
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
21507
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
8997
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
9741
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11011
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
10666
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...
0
10351
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...
0
9503
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7071
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();...
0
5735
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4546
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
4140
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.