INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

deploy asp.net application with crystal reports on server

deploy asp.net application with crystal reports on server

(OP)
I have developed an ASP.NET web application in Visual Studio 2010 professional edition. When I was done developing the web forms, I right-clicked the project in Solution Explorer and selected Publish Website. It generated compiled files in a folder. I copied that files in the application folder on the server. I copied files in that folder that has been mentioned in the physical path in my Site settings in IIS 8. The operating system on the server side is Windows Sever 2012 R2. Then I updated the web.config file for server side connection string.
Now, on my development machine, I installed SAP crystal reports version for visual studio 2010 from the following link:
http://downloads.businessobjects.com/akdlm/cr4vs20...

I also installed 64-bit SAP crystal reports runtime engine for .NET Framework 4 from the following link:
http://downloads.businessobjects.com/akdlm/cr4vs20...

After the successful installation, I created a sample report and it opened successfully in aspx page with crystal report viewer showing report data. Now I need to deploy the application having crystal report added to the server side. Do I only need to run Publish Web Site again and copy the files to the application folder or I will have to install something on server side as well to run and view crystal reports?

RE: deploy asp.net application with crystal reports on server

(OP)
I installed 64-bit SAP crystal reports runtime engine for .NET Framework 4 on server side as well.

On my development machine, I tested the connection to crystal reports using a manual connection so that I could see if it also works on server. The code for ConfigureCrystalReports is as follows:

CODE

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Try
            ConfigureCrystalReports()
        Catch ex1 As Exception
            Response.Write(ex1.ToString)
            Response.End()
        End Try
End Sub

Private Sub ConfigureCrystalReports()

        Try
            Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
            userreport.Load(Server.MapPath("rptUserList.rpt"))
            userreport.SetDatabaseLogon("sa", "123", "SERVER-1", "db1")
            myCrystalReportViewer.ReportSource = userreport
            myCrystalReportViewer.RefreshReport()
            
        Catch ex As Exception
            Response.Write(ex.Message)
            Response.End()
        End Try

End Sub 

When I click on aspx link on development machine, Enter Values dialog box appears for database login credentials. I typed the password there and unchecked Use Integrated Security and clicked Log On. The report showed perfectly in the crystal report viewer. However, when I click the aspx link on server, neither the crystal report viewer nor the Enter Values dialog box is shown. I checked the aspnet_client folder. Two folders are in the system_web folder; 2_0_50727 and 4_0_30319. Both the folders contain the folder crystalreportviewers13. I also added the following lines in web.config:

CODE

<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" />
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
</sectionGroup>
</sectionGroup>
</configSections>

<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true" />
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="/crystalreportviewers13" />
</crystalReportViewer>
</crystalReports>
</businessObjects> 

However, the crystal report viewer is still not shown on the server.


RE: deploy asp.net application with crystal reports on server

(OP)
The following solution finally worked for me.

I added the following lines in web.config file. It successfully opened the crystal report viewer:

CODE

<configSections>
    <sectionGroup name="businessObjects">     
      <sectionGroup name="crystalReports">       
        <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>     
 </sectionGroup>    
</sectionGroup>  
</configSections>   
<businessObjects>   
  <crystalReports>    
    <crystalReportViewer>        
      <add key="UseBrowserLocale" value="true"/>        
<add key="resourceURI" value="~/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />      
</crystalReportViewer>    
</crystalReports>  
</businessObjects> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close