Solved

Crystal Reports work on local machine but when I upload to cloud server it does not work. VS2010

Posted on 2014-02-03
8
3,813 Views
Last Modified: 2014-02-10
Problem:  
Crystal Reports work on local machine but when I upload to cloud server it does not work.
Error:
The description for Event ID 0 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

E:\RandR\ReportViewer.aspx(22): error BC30560: 'ConnectionInfo' is ambiguous in the namespace 'CrystalDecisions.Shared'.

the message resource is present but the message is not found in the string/message table

Local Machine:  

Operating System:  Windows 7
Source Code:   Visual Studio 2010
Crystal Source:  As provided in VS2010
DataBase:  Connects to SQLServer on Cloud Database Server

Application Server: Cloud Machine:  

Window Server 2012
Operating System:  Windows 8
Source Code:   Visual Studio 2010
Crystal Source:  As provided in VS2010
DataBase:  Connects to SQLServer on Cloud Server (Same database as used in local version – no ConnectString Change)

Installed the CrysatlReports Run Time on the Application Server (Cloud) as follows:

c: ProgramFiles(X86) > SAP Business Objects > Crystal Reports for .NEt Framework 4.0 > Common > Crystal Reports 2011 > crysrtalreportsviewer > SAp BusinessObjects Enterprise XI 4.0

Web.Config  (Same on local and Cloud Application Server)
<?xml version="1.0"?><!--
--><configuration>
	<configSections>
		sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
			<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
				<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup>
    </sectionGroup><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"/>
    </sectionGroup></sectionGroup></configSections><connectionStrings>
			</connectionStrings>
	<system.web>
		
		
		
		<authentication mode="Windows">
			<forms loginUrl="LogIn.aspx" name=".ASPXFORMSAUTH" defaultUrl="LogIn.aspx">
			</forms>
		</authentication>
		<authorization>
		</authorization>
		
		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers>
		<pages>
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules>
		<compilation debug="true">
			<assemblies>
				<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
				<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        
				
      </assemblies>
		</compilation>
	</system.web>
	<system.net>
		<mailSettings>
			<smtp deliveryMethod="Network">
				<network host="mail.ruralcitysavings.com" port="587" defaultCredentials="false" userName="login" password="password"/>
			</smtp>
		</mailSettings>
	</system.net>
	<appSettings>
		<add key="EmailFrom" value="roncheney@expplus.com"/>
		<add key="EmailTo" value="roncheney@expplus.com"/>
		<add key="CrystalImageCleaner-AutoStart" value="true"/>
		<add key="CrystalImageCleaner-Sleep" value="60000"/>
		<add key="CrystalImageCleaner-Age" value="120000"/>
	</appSettings>
	<!--
	-->
	<system.webServer>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </handlers>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules></system.webServer>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/></compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="OptionInfer" value="true"/>
				<providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
	
	<businessObjects><crystalReports><rptBuildProvider><add embedRptInResource="true"/></rptBuildProvider></crystalReports></businessObjects></configuration>

Open in new window


Source Code:
        Dim cryRpt As New ReportDocument
      
        If Common.ReportName = "rptJobOrder.rpt" Then
            Dim SpecType As String = "JOB"
            Call Common.ReadMySpecHeaderTable(4, JobNo, SpecType, Nothing)
            If Common.m_RowsMSH.Length = 0 Then Exit Sub
            f_RowsMSH = Common.m_RowsMSH
          
               
            Dim r As DataRow
            Dim ds As New DataSet1
            Dim t As DataTable = ds.Tables.Add("Items")
            t.Columns.Add("JobNo", Type.GetType("System.String")) 'x
            t.Columns.Add("ClientName", Type.GetType("System.String")) 'x
            t.Columns.Add("RptName", Type.GetType("System.String"))
            t.Columns.Add("StoreNo", Type.GetType("System.String"))
            t.Columns.Add("Add1", Type.GetType("System.String"))
            t.Columns.Add("Add2", Type.GetType("System.String"))
            t.Columns.Add("Add3", Type.GetType("System.String"))
            t.Columns.Add("PhoneNo", Type.GetType("System.String"))
            t.Columns.Add("PictNote", Type.GetType("System.String"))
            t.Columns.Add("VenName", Type.GetType("System.String"))
            t.Columns.Add("VenSI", Type.GetType("System.String"))
            t.Columns.Add("OrderNote", Type.GetType("System.String"))
            t.Columns.Add("Service", Type.GetType("System.String")) 'x
            t.Columns.Add("ServiceDesc", Type.GetType("System.String"))
            t.Columns.Add("HotLine", Type.GetType("System.String"))
            For pp = 0 To f_RowsMSH.Length - 1
                f_RowMSH = f_RowsMSH(pp)
            
                Dim CtlID As Long
                Dim ClientNo, ClientStoreNo As String
                Dim ServiceNum As Long
                Dim Parms As String() = Nothing
                JobNo = f_RowMSH("MySpecNo")
                CtlID = f_RowMSH("MySpecControlID")
                ClientStoreNo = f_RowMSH("MySpecDescription")
                Parms = ClientStoreNo.Split("/")
                ClientNo = Parms(0)
                Call f_ReadMySpecOperationAttributesTable(3, CtlID, Nothing, Nothing)
                r = t.NewRow()
                r("JobNo") = JobNo
                r("RptName") = "Report Name Here" ' ??????????????????????????????
                Dim x As Integer
            
                For x = 0 To f_RowsMSOA.Length - 1
                    f_RowMSOA = f_RowsMSOA(x)
                    If f_RowMSOA("MySpecOPAttributeName") = "TempStoreNum" Then
                        r("StoreNo") = f_RowMSOA("MySpecOpAttTextValue")
                    End If
                    If f_RowMSOA("MySpecOPAttributeName") = "NeedPicture" Then r("PictNote") = "Picture Comment xxxxxxxxxxxxxxxxxxx Here" 'f_RowMSOA("MySpecOpAttTextValue")
                    If f_RowMSOA("MySpecOPAttributeName") = "CrewLeader" Then r("VenName") = f_RowMSOA("MySpecOpAttTextValue")
                    If f_RowMSOA("MySpecOPAttributeName") = "DetailedInstructions" Then r("OrderNote") = f_RowMSOA("MySpecOpAttTextValue")
                    If f_RowMSOA("MySpecOPAttributeName") = "ServiceNum" Then ServiceNum = f_RowMSOA("MySpecOpAttNumValue")
                    If f_RowMSOA("MySpecOPAttributeName") = "CrewLeader" Then r("VenName") = f_RowMSOA("MySpecOpAttTextValue")
                    'If f_RowMSOA("MySpecOPAttributeName") = "PONumber" Then r("PONumber") = f_RowMSOA("MySpecOpAttTextValue")
                Next x
                ' Get ClientStore Information -------------------------------------------------------------------- 
                r("ClientName") = "Unknown Client for Job Number - " & JobNo
                r("Add1") = "Address Unavailable"
                r("Add2") = "Address Unavailable"
                r("Add2") = "City State Zip Unavailable"
                r("PhoneNo") = "770 555-1212"
                Call Common.ReadMySpecHeaderTable(4, ClientNo, "CLT", Nothing)
                If Common.m_RowsMSH.Length > 0 Then
                    Common.m_RowMSH = Common.m_RowsMSH(0)
                    r("ClientName") = Common.m_RowMSH("MySpecDescription")
                End If
                Call Common.ReadMySpecHeaderTable(4, ClientStoreNo, "STO", Nothing)
                If Common.m_RowsMSH.Length > 0 Then
                    Common.m_RowMSH = Common.m_RowsMSH(0)
                    r("ClientName") = Common.m_RowMSH("MySpecDescription")
                
                    Call Common.ReadMySpecOperationAttributesTable(3, Common.m_RowMSH("MySpecControlID"), Nothing, Nothing)
                    If Common.m_RowsMSOA.Length > 0 Then
                        r("Add1") = "Address1 Here"
                        r("Add2") = "Address2 Here"
                        r("Add3") = ""
                        r("PhoneNo") = "Not Available"
                        r("HotLine") = "Hot Line Here"
                        Dim qq As Integer : Dim City, State, Zip As String
                        For qq = 0 To Common.m_RowsMSOA.Length - 1
                            Common.m_RowMSOA = Common.m_RowsMSOA(qq)
                            If Common.m_RowMSOA("MySpecOPAttributeName") = "Address" Then r("Add1") = Common.m_RowMSOA("MySpecOpAttTextValue")
                            If Common.m_RowMSOA("MySpecOPAttributeName") = "State" Then State = Common.m_RowMSOA("MySpecOpAttTextValue")
                            If Common.m_RowMSOA("MySpecOPAttributeName") = "City" Then City = Common.m_RowMSOA("MySpecOpAttTextValue")
                            If Common.m_RowMSOA("MySpecOPAttributeName") = "Zip" Then Zip = Common.m_RowMSOA("MySpecOpAttTextValue")
                            If Common.m_RowMSOA("MySpecOPAttributeName") = "Telephone" Then r("PhoneNo") = Common.m_RowMSOA("MySpecOpAttTextValue")
                        Next
                        r("Add2") = City & " " & State & " " & Zip
                    End If
                End If
                
                'get service information 
                Call Common.ReadMySpecHeaderTable(4, ServiceNum, "SER", Nothing)
                If Common.m_RowsMSH.Length > 0 Then
                    Common.m_RowMSH = Common.m_RowsMSH(0)
                    Call Common.ReadMySpecOperationAttributesTable(3, Common.m_RowMSH("MySpecControlID"), Nothing, Nothing)
                    If Common.m_RowsMSOA.Length > 0 Then
                        Common.m_RowsMSOA = Common.m_MySpecOperationAttributesDT.Select("MySpecOpAttributeName = '" & "ServiceNarr" & "'", Nothing)
                        If Common.m_RowsMSOA.Length > 0 Then
                            Common.m_RowMSOA = Common.m_RowsMSOA(0)
                            r("OrderNote") = r("OrderNote") & vbCr & Common.m_RowMSOA("MySpecOpAttTextValue")
                        End If
                    End If
                   
                End If
                t.Rows.Add(r)
            Next
            cryRpt.Load(Server.MapPath(Common.ReportName))
            Call SetDBLogonForReport(myConnectionInfo, cryRpt)
            cryRpt.SetDataSource(ds.Tables(1))
            CrystalReportViewer1.ReportSource = cryRpt ' Assign Report Source to CRV
            Exit Sub
        End If

Open in new window

0
Comment
Question by:rbrown0311
  • 4
  • 3
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
In the code it seems you are passing the recordset to the report from your application.  If that is the case why do you need to setup the logon information in the report?

mlmcc
0
 

Author Comment

by:rbrown0311
Comment Utility
Ok,  After copying the correct version of Crystal Runtime to a folder on the server, My Crystal report is partially working.  The report displays on the local server correctly, but when I upload it to a remote server only the Report Header and Crystal standard icons are shown.  No data is displayed on the Server version.  I am using the same Database connection and I am showing on a text field above the report Viewer the number of records in the dataset that is the datasource.  This number displays the correct number or records (Both on local server and remote server) but the remote servers does not show data.  I have exported the report to a PDF file and only the report header is shown alos, no data.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Are the runtimes loaded on the remote server?

mlmcc
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:rbrown0311
Comment Utility
Yes.  I have also removed the login.

The reports works well on my local server but when I upload it to the remote server it does not inclued the data.  Attached is .jpg file that show report on local server and on the remote server (no data).  Also notice the txt box at top of both pages contains the number of records selected (2) along with other test msg.

Thanks for you interest in helping
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
WHere is the data source?

How are you accessing it?  Is it though a URL or path that the remote site can use?

I have not written reports and published them to remote sites except when the data source is on the remote system and I either access through a VPN or a copy in the case of MS Access.

I know one issue I had was using the normal path as in C:\myapplication\mydatabase\db1.mdb.

I really need to use
\\TheirServer\myapplication\mydatabase\db1.mdb.

mlmcc
0
 

Author Comment

by:rbrown0311
Comment Utility
Thanks for your interest Savant,

The problem has been resolved.  As my problem is perhaps one that others have experienced I will share my solution to this problem.  The solution was simple.  Even though I have fought it for several months (off and on) by searching for a solution, none addressed it specifically.  It turns out that no change was required to my code.  

I am using Windows 7 , VS2010 VB (Web) connecting via VPN to the Cloud Database (MS SQL Server 2012) Windows 8.  I upload my application to an application Server (Windows 8) using Coffee Cup Free for the FTP.

Solution:  1) On my Development machine:  Reload the Crystal Development Code for VS2010 from the SAP site From the http://scn.sap.com/docs/DOC-7824 (From the Install Executable Column, I selected the Support Pack 8 (v. 13.0.8.1216) and chose the run option.  This took 10 minutes or so to re-install Crystal in VS2010.
2) On the Cloud Application Server: Reload the Crystal Runtime Code for VS2010 from the SAP site From the http://scn.sap.com/docs/DOC-7824 (From the MSI 64 Bit Column, I selected the msi64.bit and chose the run option.  This took couple minutes or so to re-install Crystal Runtime.
0
 

Author Closing Comment

by:rbrown0311
Comment Utility
Thanks Savant!

This is not the solution to my problem but I appreciate the effort by Savant!

See my last comment for my solution.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now