Click here to Skip to main content
15,891,841 members

Crystal Report Printing Problem,and errors

Mohammed Abdul Muqeet asked:

Open original thread
i have configured my website in IIS crystal report is showing some errors .

its printing from first page when i search the report its printing from first page .


i have installed visual studio 2010...

SAP Crystal report Version Visual studio 2010,

SAP Crystal report runtime engine for .NET framework 4 (32-bit)

---------------

Error 10 Unknown server tag 'CR:CrystalReportViewer'. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 132

---------------

Error 4 Could not load file or assembly 'CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 5

----------------

Error 7 Could not load file or assembly 'CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 8

------------------

Error 8 Could not load file or assembly 'CrystalDecisions.ReportAppServer.XmlSerialize, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.- C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 9

-------------------

Error 9 Could not load file or assembly 'CrystalDecisions.ReportAppServer.ObjectFactory, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 10

---------------

Error 5 Could not load file or assembly 'CrystalDecisions.ReportAppServer.Controllers, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 6

----------------

Error 6 Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. C:\inetpub\wwwroot\Mreport\aspnet_client\system_web\4_0_30319\crystalreportviewers13\preview.aspx 7


i am using this code

C#
using CrystalDecisions.Web;
using CrystalDecisions.Shared;

public partial class About : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ToString());
    SqlCommand cmd = new SqlCommand();
    SqlDataAdapter da = new SqlDataAdapter();
    DataTable dt = new DataTable();
    DataTable dt1 = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument crystalReport = new ReportDocument();
        crystalReport.Load(Server.MapPath("CrystalReport2.rpt"));
        crystalReport.SetDatabaseLogon("sa", "123456789", @"TRAINING-ROOM-8", "newMreport");
        CrystalReportViewer1.ReportSource = crystalReport;
    }
 protected void Button2_Click(object sender, EventArgs e)
    {
 SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where Patient = @Patient   ");
                cmd.Connection = con;
                cmd.Parameters.Add("@Patient", SqlDbType.NVarChar).Value = TextBox3.Text;
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                dt.Clear();
                da.Fill(dt);
if (dt.Rows.Count > 0)
            {

                ReportDocument Report = new ReportDocument();
                Report.Load(Server.MapPath("~/CrystalReport2.rpt"));
                Report.SetDataSource(dt);
                Report.SetDatabaseLogon("sa", "123456789", @"TRAINING-ROOM-8", "newMreport");
                CrystalReportViewer1.ReportSource = Report;
                CrystalReportViewer1.ReportSource = Report;
                CrystalReportViewer1.DataBind();
              
            }
}
Tags: C# (C# 2.0, C# 3.0, C# 4.0), Visual Studio (Visual Studio 2010), CrystalReports

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900