Click here to Skip to main content
15,794,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I am facing issue in Crystal report.

<target>.amount and <source>.amount have conflicting properties: DataType property mismatch.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.DataException: <target>.amount and <source>.amount have conflicting properties: DataType property mismatch.

Source Error:

Line 25:         dt = getdata().Tables[0];
Line 26:
Line 27:         dss.Tables[0].Merge(dt);Line 28:
Line 29:         rptdoc.Load(Server.MapPath("SalesReport.rpt"));

My Code:
protected void Page_Load(object sender, EventArgs e)
        ReportDocument rptdoc = new ReportDocument();
        dssales dss = new dssales();
        DataTable dt = new DataTable();
        dt.TableName = "Crystal Report";
        dt = getdata().Tables[0];
        CrystalReportViewer1.ReportSource = rptdoc;

1 solution

My Dear Friend Add All these NameSpaces.....

using System;
using System.Collections;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Data;
using System.Xml.Linq;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data.SqlClient;

Ok, This will be helpful to you
Share this answer
Arul R Ece 4-Jun-12 1:27am    

I have already added the mentioned Name Spaces

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