Click here to Skip to main content
15,883,558 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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();
              
            }
}
Posted
Updated 18-May-16 4:50am

it could be problem related to
CrystalDecisions.Web, Version=12.0.2000.0

make sure version of crystal report installed on server is same as used in development.

and install .net framework 2.0 also, because mostly crystal report need it as prerequisite.

Happy Coding!
:)
 
Share this answer
 
Dear muqeet,

Please Install Business Objects for Crystal Reports.

May be this will help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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