cancel
Showing results for 
Search instead for 
Did you mean: 

Version Mismatch on Deployment

Former Member
0 Kudos

Hi,

I think I have a version mismatch problem here on deployment, but cannot figure out how to resolve it. We have two ASP.NET web apps deployed, called App1 and App2. Both use Crystal Reports. The reports display fine in a report viewer on App1 but on App2 all I get is a blank viewer.

App1 was originally developed in Visual Studio 2008 along with CR2008, incorporating CrystalDecisions.Web ver. 12.0.2000. Then it was deployed to the server, along with appropriate redistributable. It all worked fine.

App2 came along, and I switched to VS2010 and CR2010. I also converted App1 to build and run on my dev machine in VS2010 and CR2010, using CrystalDecisions.Web ver. 13.0.2000. On my dev machine, both apps run fine and report fine.

I deployed App2 to the server, along with the appropriate redistributable for CR. I did not deploy the updated App1. So now on the server, App1 is looking for ver. 12.0.2000.0 of CrystalDecisions.Web in the GAC, and App2 is looking for ver. 13.0.2000.0.

I have verified that both versions of CrystalDecisions.Web are in the GAC.

Now App1 still reports fine on the server (although there were some non-reproducible hiccups), but App2 will not display the report. The viewer comes up blank. Again, this works on my dev machine.

Any suggestions as to why App2 will not view the reports? The relevant code from the App2 web.config is listed below. The source code from the page that actually displays the report is in a followup reply, since it seems too large to put in this message.

Thanks.

--Dan

web.config


<?xml version="1.0"?>
<configuration>
  <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"/>
      </sectionGroup>
    </sectionGroup>
  </configSections>
  
	<appSettings>
	  <add key="CrystalImageCleaner-Age" value="120000"/>
	  <add key="CrystalImageCleaner-AutoStart" value="true"/>
	  <add key="CrystalImageCleaner-Sleep" value="60000"/>
 
	  <!--	DB credentials for CrystalReports -->
		<add key="ReportDatabaseName" value="MyDB"/>
		<add key="ReportPassword" value="myPassword?"/>
		<add key="ReportServerName" value="MyServer"/>
		<add key="ReportUserID" value="MyUser"/>
	</appSettings>
 
	<system.web>
      <compilation debug="true" targetFramework="4.0">
         <assemblies>
           <add assembly="CrystalDecisions.CrystalReports.Engine, 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.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
           <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
           <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
         </assemblies>
         <buildProviders>
            <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
         </buildProviders>
      </compilation>
     
	  <httpHandlers>
		<add verb="GET" path="CrystalImageHandler.aspx" type="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 controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
	</system.web>
 
	<system.webServer>
	  <handlers>
		<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
		<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"/>
	  </handlers>
 
	</system.webServer>
 
   <businessObjects>
      <crystalReports>
         <rptBuildProvider>
            <add embedRptInResource="true"/>
         </rptBuildProvider>
      </crystalReports>
   </businessObjects>
</configuration>



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Still working this problem. Lots of hints but no answers yet.

When the viewer comes up blank for App2, there is a yellow warning icon in the status bar. Double clicking gives the error msg: "'bobj' is undefined"

Looking at the the virtual directory for App1 (which works) there is the following folder structure:

aspnet_client
      system_web
         2_0_50727
            crystalreportsviewers12
              js
              lots of other folders and files

The js subfolder contains a number of folders and files containing JavaScript.

There is no comparable folder under the App2 virtual directory, but I found something comparable in c:\program files\SAP BusinessObjects. So I copied the crystalreportsviewers from there to the App virtual directory as follows:

aspnet_client
      system_web
         4_0_30319
            crystalreportsviewers

No luck. The report viewer still comes up blank and the warning icon still indicates "'bobj' is undefined".

Any suggestions? This really smells like some javascript library is not getting loaded.

Thanks.

--Dan

former_member183750
Active Contributor
0 Kudos

Se the following KBs"

[1278952 - ASP.NET Error 'BOBJ is undefined'|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233373338333933353332%7D.do]

[1531003 - Error: bobj undefined - javascript error|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533333331333033303333%7D.do]

[1281101 - The yellow exclamation mark icon shows up in the status bar when ASP.NET application runs|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233383331333133303331%7D.do]

While you are not using CR 2008, the general steps in the above KBs will apply to CRVS2010 (only the path details will change)

I believe also that if you search the forums for bobj or blank you'll get more help and some will be for crvs2010.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Edited by: Ludek Uher on Jan 11, 2012 10:59 AM

Former Member
0 Kudos

Hi Ludek,

Thanks for the response. However, none of these KB's solved my problem, although they all looked reasonable.

The first pertains to IIS 7, but I am using IIS6, so the Integrated Application Pool is not relevent.

The second recommends copying a folder from the c:\program files folder to c:\windows. Even allowing for the slightly different folder names, that did not work.

The 3rd KB recommended copying that same folder to the virtual root, and editing the web.config accordingly. However, the web.config syntax is specific to the previous version of .NET. I did find a post on the web w/ the correct syntax for web.config but that did not work. I tried copying the CrystalReportViewers folder both as a direct sub of the virtual root and also as a sub of aspnet_client\system_web\4_0_30319, but neither worked.

Finally, I found a post which suggested embedding a script tag pointing to the crv.js file buried deep in the crystalreportsviewers folder, but that did not work either.

Clearly, this is a deployment issue in that it is not finding a JavaScript resource, and it is near by.

Thanks for your help. I am really stumped.

--Dan

former_member183750
Active Contributor
0 Kudos

Hello Dan

Very strange. I've been going over cases, etc., to see if anyone else reported a solution to something similar, but no luck. I'd like to suggest an http sniffing utility. It may help you discover where the app is looking for "things"...

There are two that I know about; [charles|http://www.charlesproxy.com/] and [fiddler|http://www.fiddlertool.com/fiddler/]. I find charles a bit easier to use...

- Ludek

former_member188030
Active Contributor
0 Kudos

Hi Dan,

Few things you could try

- Copy the CrystalReportViewers13 folder from your developement machine and move it over to server.

- What version of IE is used, see if compatibility mode helps.

- Just as a test try developing a sample app just to view the report (assign the reportsource directly to viewer), let the report prompt for db credentials. See if that reproduces the issue.

I am also curious as what the troubleshooting tools have to say over this ( procmon, charles).

See if this helps,

Bhushan.

Former Member
0 Kudos

Thanks for the replies. I finally got it working. The problem was that the crystalreportsviewers13 folder was missing. It is interesting it was present in several locations on the server, plus under a slightly different name on the server, but not in the critical location (different from on my dev machine) necessary to work. There were no changes necessary to the web.config.

So here is what works. It is not clear to me that all of these are necessary.

On my dev machine:

C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers12

C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers13 (I think this is unecessary)

C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12

C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\

Crystal Reports 2011\crystalreportviewers (note there is no number at the end of the final node name)

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\crystalreportviewers12

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\crystalreportviewers13 (I think this is unecessary)

C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13

There are no aspnet_client folders in the virtual roots on the dev machine.

On the server (Windows Server 2003 R2 running IIS 6):

C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers12 (I think this is unecessary)

C:\Inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12 (I think this is unecessary)

C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\

Crystal Reports 2011\crystalreportviewers (note there is no number at the end of the final node name)

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13

(there is no equivalent under v2.0.50727)

Virtual Root\aspnet_client\system_web\2_0_50727\crystalreportviewers12 (I think this is unecessary)

Virtual Root\aspnet_client\system_web\4_0_30319\crystalreportviewers13

I hope this is helpful.

--Dan

Former Member
0 Kudos

I have done some more work to remove the unnecessary instances of the crystalreportsviewers folders. This is now what I have on both my dev machine and the server.

On my dev machine:

C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12

C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\

Crystal Reports 2011\crystalreportviewers (note there is no number at the end of the final node name)

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\crystalreportviewers12

C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13

There are no aspnet_client folders in the virtual roots on the dev machine.

On the server (Windows Server 2003 R2 running IIS 6):

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13

(there is no equivalent under v2.0.50727)

Virtual Root\aspnet_client\system_web\2_0_50727\crystalreportviewers12 (I think this is unecessary)

Virtual Root\aspnet_client\system_web\4_0_30319\crystalreportviewers13

I tried putting the same folders under c:\windows\Microsoft.NET on the server as on my dev machine, and removing them from the virtual directory, but that broke the app.

So the big question is "Why do I not need the aspnet_client" folders on my dev machine, but do need them on the server?

former_member183750
Active Contributor
0 Kudos

There are a few things to consider;

1) When running the app on the development computer, you have the option of running the app under File System (Cassini) or HTTP. When choosing File System, the viewer used will be from the C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonCrystal Reports 2011crystalreportviewers directory.

Using HTTP, the directory will be C:inetpubwwwrootaspnet_clientsystem_web4_0_30319crystalreportviewers13

2) On deployment, the MSI / MSM does not know if an app will be installed under default or custom app pool. Even if it knew an app would go under a custom app pool, it would have no idea which one. So, the viewer is / should be installed and configured under the default app pool (pointing to C:inetpubwwwrootaspnet_clientsystem_web4_0_30319crystalreportviewers13). For custom app pool configuration see KB [1605773 - CRVS2010 web viewer is not displaying the Crystal report|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333633303335333733373333%7D.do]

- Ludek

Former Member
0 Kudos

For those who are interested, I posted a blog article summarizing my problems with the version mismatch and the solution at http://danhurwitz.wordpress.com/.

Answers (1)

Answers (1)

Former Member
0 Kudos

Here is the rest of the source code, both declarative and code-behind.

ReportPage.aspx


<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="ReportPage.aspx.cs"
	Inherits="Reports_ReportPage" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
	Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
	<title></title>
</head>
<body>
	<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager2" runat="server"></asp:ScriptManager>
	
	<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
      AutoDataBind="True"
		GroupTreeImagesFolderUrl="" 
		Height="1158px" 
		ToolbarImagesFolderUrl=""
		ToolPanelWidth="200px" 
		Width="1059px" />

	</form>
</body>
</html>

ReportPage.aspx.cs


using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Configuration;
using System.Data;
using System.Text;							

public partial class Reports_ReportPage : Page
{
	ReportDocument rptDoc;

	protected void Page_Load(object sender, EventArgs e)
	{
		#region QueryStrings
		long lngKeyFieldID = -1;
		string strReportName = string.Empty;
		string strReportType = string.Empty;
		
		if (Request.QueryString["strReportName"] != null)
			strReportName = Request.QueryString["strReportName"].ToString();

		if (Request.QueryString["strReportType"] != null)
			strReportType = Request.QueryString["strReportType"].ToString();

		if (Request.QueryString["KFID"] != null)
		{
			lngKeyFieldID = Convert.ToInt64(Request.QueryString["KFID"]);
		}
		#endregion		//  QueryStrings

		rptDoc = new ReportDocument();

		string strReportSourceFolder = ConfigurationManager.AppSettings["ReportSourceFolder"];
		rptDoc.Load(strReportSourceFolder + strReportName + ".rpt");

      #region parameters
      if (lngKeyFieldID > 0)
		{
         //  set parameters based on rpt name
			switch (strReportName)
			{
				case "JobDetails":
					rptDoc.SetParameterValue("JobID", lngKeyFieldID);
					rptDoc.SetParameterValue("IsPaid", true);
					break;
			}		
		}
		#endregion		//  parameters
 
		#region DB connection
		//  from Deepu at SAP tech support
		//  this is necessary to pass db credentials programmatically
		//  the report must be designed in CR using an OLE DB connection type
		ConnectionInfo conn = new ConnectionInfo();
		conn.ServerName = ConfigurationManager.AppSettings["ReportServerName"];
		conn.DatabaseName = ConfigurationManager.AppSettings["ReportDatabaseName"];

		if (conn.ServerName == "Dev")
			conn.IntegratedSecurity = true;
		else
		{
			conn.UserID = ConfigurationManager.AppSettings["ReportUserID"];
			conn.Password = ConfigurationManager.AppSettings["ReportPassword"];
		}

		Tables tables = rptDoc.Database.Tables;
		foreach (Table table in tables)
		{
			TableLogOnInfo tableLogonInfo = table.LogOnInfo;
			tableLogonInfo.ConnectionInfo = conn;
			table.ApplyLogOnInfo(tableLogonInfo);
		}	
		#endregion		//  DB connection

		#region Viewer
		CrystalReportViewer1.DisplayGroupTree = false;		//  deprecated, but still works
		CrystalReportViewer1.DisplayToolbar = true;
		CrystalReportViewer1.HasToggleGroupTreeButton = false;
		CrystalReportViewer1.HasToggleParameterPanelButton = false;

		CrystalReportViewer1.Page.Title = strReportName;

		CrystalReportViewer1.ReportSource = rptDoc;
		#endregion		//  Viewer
	}		

	protected void Page_Unload(object sender, EventArgs e)
	{
		if (rptDoc != null)
		{
			rptDoc.Close();
			rptDoc.Dispose();
		}
	}
	
}