Print Page | Close Window

Field name not known

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13635
Printed Date: 17 May 2024 at 6:56pm


Topic: Field name not known
Posted By: zykes
Subject: Field name not known
Date Posted: 29 Jun 2011 at 5:02pm
Hi,

This has been bugging me for few days. I have a web application in visual studio 2005 with Crystal Report 2008 and a database of SQL 2008.

I'm using Report Viewer version 12.0.2000 in visual studio to display crystal report. My other reports are working perfectly fine but this Reports which has formula fields on the header portion of CR are creating errors.

here's the error:

This field name is not known. Details: errorKind Error in File MyReport {466F2BF2-CAB2-4916-A7E8-93682C8F17A9}.rpt: Error in formula MBrach: 'if not isnull({?@M_Code} ) then ' This field name is not known. Details: errorKind

here's my code in displaying data:

On Page_Init()
rd = new ReportDocument();
            ReportDoc = new ReportDocument();
            ReportDoc.Load(Server.MapPath("~/Reports/MyReportsCollection/" + "ClientReport.rpt"));
            ReportDoc.SetDataSource(ReportDiscountedVLB());
            this.CrystalReportViewer1.ReportSource = ReportDoc;
            this.CrystalReportViewer1.DataBind();


ReportDiscountedVLB() function
private DataTable ReportDiscountedVLB()
    {

        ReportsBLL RBLL = new ReportsBLL();
        DataTable dt = new DataTable();
        string AssOfDate = "";

        try
        {
          
            dt = RBLL.PopulateAgencyBreakdown("01", "CLS", "01/01/2010", "05/05/2010", "03/03/2010", "06/06/2010", 01);
        }
        catch
        {
            throw;
          
        }
        finally
        {
            RBLL = null;
        }
        return dt;

    }


PopulateAgencyBreakdown is on the BLL area and it is where the stored procedure is called

need your help crystal report gurus.



Replies:
Posted By: CircleD
Date Posted: 30 Jun 2011 at 12:39am
string AssOfDate = "";


Ass?



Print Page | Close Window