cancel
Showing results for 
Search instead for 
Did you mean: 

Recently converted VS2008 CR10.5 reports to VS 2010 CR ver 13 toolbar not working.

Former Member
0 Kudos

I recently converted an application that has been running for years from VS 2008 MVC1 with CR 10.5 to VS 2010 CR version 13. This was to fix an issue with the toolbar not showing on reports after the latest upgrades to FireFox and IE. Well - my icons are back - but none of them work. For instance when I generate a report I can see the first page has data and I can see that is 1 of 5 pages for example but when I click the next page icon the popup appears stating "Please wait while the document is being processed". This never goes away. The Print icon does not seem to do anything. Export brings up a dialog but does nothing as well when Export is clicked. Please advise. Here is the relevant parts of  my code. As I stated this is an MVC app but I am calling an aspx page to handle the CR generation and display. All of this is on my local development machine. I do not seem to be getting any errors either on the client or on the server.

My aspx:

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<script runat="server" >

      

        protected void Page_Init(object sender, EventArgs e)

        {

            CrystalDecisions.Shared.ToolbarStyle toolbarStyle = new CrystalDecisions.Shared.ToolbarStyle();

            toolbarStyle.BackColor = System.Drawing.Color.LightGray;

            CrystalReportViewer1.ToolbarStyle = toolbarStyle;

            CrystalReportViewer1.HasCrystalLogo = false;

            CrystalReportViewer1.ToolPanelView = ToolPanelViewType.None;

          

            Print();

        }

public void Print()
{
try
{
string strValue1 = Request.QueryString["value1"];

System.Data.DataSet ds = new System.Data.DataSet();
System.Data.SqlClient.SqlConnection sqlcon = new System.Data.SqlClient.SqlConnection("Data Source=(local);Initial Catalog=ULS_db1;User ID=uls2008;Password=uls2008");
System.Data.SqlClient.SqlCommand comand = new System.Data.SqlClient.SqlCommand();
comand.Connection = sqlcon;
comand.CommandText = strSP;
comand.CommandType = System.Data.CommandType.StoredProcedure;

string strReportPath = Server.MapPath("~/Reports/EquipAssinedTo.rpt");
comand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@assignedTo", System.Data.SqlDbType.VarChar, 50));
comand.Parameters["@assignedTo"].Value = strValue1;

System.Data.SqlClient.SqlDataAdapter sqladp = new System.Data.SqlClient.SqlDataAdapter(comand);

sqlcon.Open();
sqladp.Fill(ds, "myDataSet");

CrystalDecisions.CrystalReports.Engine.ReportDocument oRpt =  new CrystalDecisions.CrystalReports.Engine.ReportDocument();

oRpt.Load(strReportPath);
oRpt.SetDataSource(ds.Tables[0]);

CrystalReportViewer1.ReportSource = oRpt;

sqlcon.Close();

}
catch (Exception ex)
{
string msg = ex.Message;
Logit(msg);
}  
}

</script>

my web.config:

<assemblies>

<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />

<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

<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>

<httpHandlers>

...

<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />

</httpHandlers>

<handlers>

...

<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" />

</handlers>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As an update. I have created a new small sample application with one report pulling its data from the same DB as my other app. I removed CR for VS 2008 from my dev machine. When I created my new report I used the native SQL Server Client 11.0 when connecting to the DB in the report. When I preview the report in the VS report designer I have no issues. I can page - no problem. However when I run the report I get the same problem as before. I see the report fine with number of pages correct however none of the toolbar buttons work. I am looking at the network traffic in my browser debugger (Firefox) and nothing seems out of line. Please anyone with a suggestion I am all ears as I am becoming a bit desperate. Thanks in advance.

former_member183750
Active Contributor
0 Kudos

Hi Mike

See:

Viewer toolbar images appear as red ‘X on Crystal Reports VS .NET web viewer

Also, see:

Visual Studio 2012 Crystal Report not working on Windows Server 2012/ 0x800a1391 &amp;#8211; JavaScr...

Using the search term 'crystal net viewer' in the search box at the top of this page will also return a number of KBAs that may help.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Former Member
0 Kudos

Only the second link you sent could have been a possibility but that did not work either. My problem is in development not a deployment issue. I can see the report and toolbar fine when I run my app. The toolbar buttons just don't work. I am not getting any errors either. Would it help to uninstall CR and reinstall it? Any other suggestions. I am at my wits end.

Thanks,

Mike

former_member183750
Active Contributor
0 Kudos

What browser are you using?

I doubt reinstall will do anything, unless you have CR 10.5 or 10.2 on the computer. If you do, uninstall those and reinstall CRVS.

- Ludek

Former Member
0 Kudos

Hi Ludek,

I've tried all 3 browsers (Chrome, IE and Firefox). I've already uninstalled 10.5 so that was not the issue. I do have an update that is promising. I just created a .NET web forms sample with basically the same CR code and web.config settings and the toolbar works. This leads me to believe it is something with the way MVC is routing the or not routing the requests from the toolbar. I am investigating this. If this sheds any new light on the issue please let me know.

Thanks,

Mike

Former Member
0 Kudos

Okay - its an MVC thing for sure. Where the old CRV worked fine with MVC views in VS2008 this one does not. I have found no way to use an MVC view to have the CRV work properly so the answer - for me anyway - is to use a web form in my MVC app. In order to have the web form look like its a part of my app I can house it in an iframe. I tested this and it works - toolbars and all. Someone had the same issue here:

http://stackoverflow.com/questions/154702/crystalreportviewer-buttons-broken-using-mvc-framework

and here

http://stackoverflow.com/questions/3902195/asp-net-mvc-vs2010-crystal-reports-beta-2-cant-print-expo...p

Thanks!

Answers (0)