473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

deploy crystal report on asp.net server

parshupooja
159 100+
Hey All,

I have created asp.net application which includes crystal report page on my local machine, it works fine. but when i try to deploy it to remote server it throws error. I was not even being able to build the solution than i did good I found solutions that we need to include DLL in Bin folder, it included and updated the reference. Now I am able to build solution but when I try to run application it throws error on crystal report page on bold italic line

Error:
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocu ment' threw an exception.
code
Expand|Select|Wrap|Line Numbers
  1.  
  2.     protected void Page_Load(object sender, EventArgs e)
  3.     {
  4.                // object declration 
  5.         CrystalDecisions.CrystalReports.Engine.Database crDatabase;
  6.         CrystalDecisions.CrystalReports.Engine.Table arTable;
  7.         CrystalDecisions.CrystalReports.Engine.Table brTable;
  8.         CrystalDecisions.CrystalReports.Engine.Table crTable;
  9.         CrystalDecisions.CrystalReports.Engine.Table drTable;
  10.  
  11.         TableLogOnInfo dbConn = new TableLogOnInfo();
  12.         // new report document object 
  13.         ReportDocument oRpt = new ReportDocument();                // loading the ItemReport in report document 
  14.         oRpt.Load(Server.MapPath("------.rpt"));
  15.  
  16.         // getting the database, the table and the LogOnInfo object which holds login onformation 
  17.         crDatabase = oRpt.Database;
  18.  
  19.  
  20.         // getting the table in an object array of one item 
  21.         object[] arrTables = new object[4];
  22.  
  23.         crDatabase.Tables.CopyTo(arrTables, 0);
  24.  
  25.  
  26.         // assigning the first item of array to crTable by downcasting the object to Table 
  27.         arTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[0];
  28.         brTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[1];
  29.         crTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[2];
  30.         drTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[3];
  31.  
  32.         dbConn = arTable.LogOnInfo;
  33.         dbConn = brTable.LogOnInfo;
  34.         dbConn = crTable.LogOnInfo;
  35.         dbConn = drTable.LogOnInfo;
  36.  
  37.  
  38.         dbConn.ConnectionInfo.DatabaseName = "--";
  39.         dbConn.ConnectionInfo.ServerName = "--";
  40.         dbConn.ConnectionInfo.UserID = "--";
  41.         dbConn.ConnectionInfo.Password = "---";
  42.       dbConn.ConnectionInfo.IntegratedSecurity= true;
  43.  
  44.         // applying login info to the table object 
  45.         arTable.ApplyLogOnInfo(dbConn);
  46.         brTable.ApplyLogOnInfo(dbConn); 
  47.         crTable.ApplyLogOnInfo(dbConn); 
  48.         drTable.ApplyLogOnInfo(dbConn);
  49.         // defining report source 
  50.         CrystalReportViewer1.ReportSource = oRpt;
  51.  
  52.         setReportParameters(); 
  53.  
  54.   -    }
  55.  
  56.  
any help appreciated
Jan 30 '08 #1
10 3427
DrBunchman
979 Expert 512MB
Have you checked if CrystalReports for .NET Framework 2.0 has been installed on the server? If you're lucky it could be as simple as that!

Dr B
Jan 30 '08 #2
parshupooja
159 100+
thanks but How do i find out that? if its not there on server, is it necessary to install there, cant I deploy without installing there?


Have you checked if CrystalReports for .NET Framework 2.0 has been installed on the server? If you're lucky it could be as simple as that!

Dr B
Jan 30 '08 #3
DrBunchman
979 Expert 512MB
I think if you check Control Panel - Add/Remove Programs it will display which .Net components are installed.

In order to install the Crystal Reports for .Net Framework 2.0 you need to create an installer by following these steps:
  1. Go to create a new project in Visual Studio
  2. Select 'Other Project Types' from the New Project dialog box then select 'Setup and Deployment' and Ok
  3. Right click the project in the solution explorer and go to properties
  4. Click the 'Prerequisites' button
  5. Check both MDAC 2.8 and Crystal Reports for .Net Framework 2.0 then Ok
  6. Compile the project and your installed should be in the release folder. Run the .msi file on the deployment server.
Hope this helps.

Dr B
Jan 31 '08 #4
parshupooja
159 100+
thanks fro replying again. server where i am working does not have visual studio, they have web devloper and web developer there is no option called as new project. there is new website option in web developer, when i click it does not show other project types.

Can this be done in web devloper as i have no right to install anything there?

thanks

I think if you check Control Panel - Add/Remove Programs it will display which .Net components are installed.

In order to install the Crystal Reports for .Net Framework 2.0 you need to create an installer by following these steps:
  1. Go to create a new project in Visual Studio
  2. Select 'Other Project Types' from the New Project dialog box then select 'Setup and Deployment' and Ok
  3. Right click the project in the solution explorer and go to properties
  4. Click the 'Prerequisites' button
  5. Check both MDAC 2.8 and Crystal Reports for .Net Framework 2.0 then Ok
  6. Compile the project and your installed should be in the release folder. Run the .msi file on the deployment server.
Hope this helps.

Dr B
Jan 31 '08 #5
DrBunchman
979 Expert 512MB
Do you use Visual Studio on your development machine?
Feb 1 '08 #6
parshupooja
159 100+
i have visual studio 2005 on machine where I developed application, crystal report works fine on it. but on server where I am trying to deploy, has web developer.

Do you use Visual Studio on your development machine?
Feb 5 '08 #7
DrBunchman
979 Expert 512MB
Go through the steps I outlines above on your machine with Visual Studio then copy the deployment file to the server and run it.

Let me know how it goes,

Dr B
Feb 6 '08 #8
parshupooja
159 100+
ok I tried following steps provided but you did not mention which template to choose from other project -setup and deployment, I tried choosing setup first and make sure of 'Prerequisites' . but when i tried to build the project in it starts windows installer and asks me the location of SqlRun_Tools.msi. I tried to use my sql server disc but it doesnot let me install it.
I tried choosing other types of templates under -setup and deployment but I have same issue


/mergemodule/websetup one by one
any suggestion?
Thanks,
Go through the steps I outlines above on your machine with Visual Studio then copy the deployment file to the server and run it.

Let me know how it goes,

Dr B
Feb 6 '08 #9
DrBunchman
979 Expert 512MB
Hmm not sure about that one...when I did this I didn't come across any problems. Anyone else got a suggestion? I'll do a little research and see what I can come up with.

Sorry I can't be more help at this stage.

Dr B
Feb 8 '08 #10
parshupooja
159 100+
Thanks for help,

Finally I client has been convinced to install visual studio 2005 on server.I am sure it will resolve the problem

Regards,

Hmm not sure about that one...when I did this I didn't come across any problems. Anyone else got a suggestion? I'll do a little research and see what I can come up with.

Sorry I can't be more help at this stage.

Dr B
Feb 8 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Danny J. Lesandrini | last post by:
First, this is _not_ a question about how to get Crystal Reports to run on a client machine. I've got all the merge modules added to the project and it's working fine. The question is about...
1
by: Mary | last post by:
I'm a newbie also. My app runs great on my PC. However, I don't want to run it for everyone else which is what is happening now. It's a pretty simple app, 1 windows form calls on 1 of 4 other...
0
by: Grey | last post by:
I wanna use crystal report as web reporting tools in ASP.NET. I want to know that how to display a crystal report form on the IE? I don't know how to write code to display report. Moreover, Does it...
0
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
4
by: Aaron Schnieder | last post by:
Hi, I have developed an ASP .NET application which using Crystal Reports for my reporting needs. My local development is Windows XP Pro with IIS and Visual Studio .NET 2003. The ASP .NET site...
5
by: usunto_bryjamus | last post by:
Hi, Is it possible to deploy Crystal Report for VS2003 using other environment to build setup e.g. Installer2Go or InnoSetup? -- *Best regardsDe,* Klaudiusz
9
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
1
by: Duong Nguyen | last post by:
Hello, I write my application in VS.NET 2005. But I don't know how to deployment this application in order to all the report (Crystal Report in VS.NET) works well. It's so silly to setup whole...
2
by: slishnevsky | last post by:
Hi, I have Crystal Report with 2 input parameters. In Development environment I used Development SQL Server to connect to in order to created the report. When I run Preview within VS 2005...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.