Skip to Content
0
Former Member
Jun 04, 2007 at 12:41 PM

Problem with variables in formulas when using CrystalReportViewer

173 Views

Post Author: Aksu

CA Forum: Formula

Hi! I have a problem with variables in Crystal Reports formulas, when using CrystalDecisions.Windows.Forms.CrystalReportViewer class from VS2005-project. ReportViewer always gives error:*************Crystal Report Windows Forms ViewerThis field name is not known.Details: errorKindError in File C:\{dir&#93;}\{file}.rpt:Error in formula <mCustomerAttributes>.'Dim result As String'This field name is not known.Details: errorKind ************* Report without variables works fine with Viewer and in Crystal Reports Designer report with variables works also fine. I have tried with both "formula-syntaxes" - basic and crystal. But Viewer always gives error when trying to define new variable.I think the problem might be with CR -versions, because VS-project has formerly been designed to VS2003 and CR9 or 10. Now I'm using VS2005 and CR11. Though I have changed all references to new CrystalDecisions-asseblies (Ver.11.0.3300.0), when I debug the project and checkout the Viewers ReportSources FormatEngine Shows version CR9_2.... I have no idea where it gets this version...***************DEBUG-view when Viewer is created *******************CrystalReportViewer |_ ReportSourceClassFactoryName ... , Version=11.0.3300.0 , ... |_ ReportSource |_ FormatEngine {CrystalDecisions.CrystalReports.Engine.FormatEngine} |_ ClientVersionHeader {CrystalDecisions.Shared.ReportServiceVersionHeader} |_ | version = 920 (int) |_ Static members |_ VER_CR9 = 920 (int)**************************************** Could anyone have any answers or tips for this problem? I'd really appreciate it... ---Aksu