cancel
Showing results for 
Search instead for 
Did you mean: 

This field name is not known. on the server

Former Member
0 Kudos

I have an issue using RPT file to generate a report using my .NET web app on the server, locally the report is generated fine, but on the server it's giving me the error "The field name is not known":


[COMException (0x80041019): This field name is not known.

Details: errorKind

Error in File FormListAddons {74708A80-A1B6-494F-A141-C83C61F45047}.rpt:

Error in formula Object_Visibility:

'{visa_clients.addon1} = ""'

This field name is not known.

Details: errorKind]

  CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) +0

  CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +362

[FormulaException: This field name is not known.

Details: errorKind

Error in File FormListAddons {74708A80-A1B6-494F-A141-C83C61F45047}.rpt:

Error in formula Object_Visibility:

'{visa_clients.addon1} = ""'

This field name is not known.

The line mentioned above causing the error, is a script on crystal report to suppress the field if this condition is met:

{visa_clients.addon1} = ""

My PC is running Crystal Report version 11, however the Crystal Report runtime on the server running the version 10.5.1.0

Both locally and on the server, i'm using the same datasource. Even locally i'm connecting the database on the Server.

I would appreciate your help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Jasim

What is the version of the CR assemblies referenced in your project?

What database?

How are you connecting to the database?

See if enabling "Verify on 1st refresh" option helps.

Any subreports?

What is the code you are using to log on to the database?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Hi Ludek,

What is the version of the CR assemblies referenced in your project?

Version 11

What database?

SQL Server 2012

How are you connecting to the database?

It's a dot net web app, i'm connecting using connection string on the web.config !

See if enabling "Verify on 1st refresh" option helps.

I've seen this suggestion before, but it didn't help

Any subreports?

There is no subreports

What is the code you are using to log on to the database?

I'm using MVC Dot Net Web App, the connection to the database is done through DBML file, which is LINT to SQL Class.

I need to remind you, the same application with the same connection string to the server's database is working fine locally, but not working on the server.

Answers (1)

Answers (1)

0 Kudos

CR 11 is updated version of CR 10.5. You need to either change the references on your DEV PC to version 10.5 or install the runtime on the Server to match your DEV PC.

CR 11 has likely an updated CRDB dll that changed the way the field is referenced or something has changed and the RPT file needs to be updated.

Don

Former Member
0 Kudos

I'm using shared hosting, the Crystal Report is provided by the hosting company, it's not possible at the moment to upgrade the runtime on the server. If I reference the old version on my PC, I wouldn't be able to run the report locally either.

In my Dot Net project, the following Crystal Report DLLs are referenced and copied in the App BIN directory on the server:

CrystalDecisions.CrystalReports.Engine.dll

CrystalDecisions.ReportAppServer.ClientDoc.dll

CrystalDecisions.ReportAppServer.CommLayer.dll

CrystalDecisions.ReportAppServer.Controllers.dll

CrystalDecisions.ReportAppServer.DataDefModel.dll

CrystalDecisions.ReportSource.dll

CrystalDecisions.Shared.dll

CrystalDecisions.Web.dll

It's good to mention, that both the PC and the server are running 64bit Crystal Report runtime.

former_member183750
Active Contributor
0 Kudos

You have a bunch of problems here. But the main one is your hosting environment,. If you can not update the runtimes, we stop right there... no point continuing anymore. Other than that;

Version 11 assemblies does not tell me anything as these could be 11.0.3300.0 or 11.5.3300.0  or 11.5.3700.

None of those versions would support SQL Server 2012 anyhow.

Versions of CR (CR 2011( v. 14.0), CR 2013, (v. 14.1) and CRVS v. 13.x)) that support SQL Server 2012 need the SQL Native 11 client installed. If you want to go into an unsupported environment, try that, but make sure you are using assemblies of version 11.5.x. 11.0.x will not work - period.

This does not make any sense:

It's a dot net web app, i'm connecting using connection string on the web.config !

If it is not a .net web app, how can it be using web.config?

This does not tell me anything useful at all either:


What is the code you are using to log on to the database?

I'm using MVC Dot Net Web App, the connection to the database is done through DBML file, which is LINT to SQL Class.

- Ludek

Former Member
0 Kudos

It seems i'm posting in the wrong forum, please guide where can I post this question, to find someone who could have experience with Visual Studio and Crystal Report.

I have 3 RPT files on my project, 2 generated successfully, only one is failing, because i'm using a script on the RPT file to suppress a field if the value is null or empty.

So the statement of Crystal Report version 11.x not working with SQL Server 2012 is totally out of the subject.

here is my code, for someone who knows how to read it:

              

CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

              

System.IO.DirectoryInfo TemplatesPath = new System.IO.DirectoryInfo(System.Web.Hosting.HostingEnvironment.MapPath("~/rptTemplates"));

              

string templateFile = TemplatesPath + "/" + "FormListAddons.rpt";

              

rpt.Load(templateFile);

              

var table = dbmgr.listClients(in_group_id);

              

rpt.SetDataSource(table);

              

System.IO.DirectoryInfo FilePath = new System.IO.DirectoryInfo(System.Web.Hosting.HostingEnvironment.MapPath("~/UserGeneratedReports"));

              

string FileName = "FormList_" + in_group_id.ToString() + ".pdf";

              

if (System.IO.File.Exists(FilePath + "/" + FileName))

                  

System.IO.File.Delete(FilePath + "/" + FileName);

              

rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, FilePath + "/" + FileName);

              

rpt.Dispose();

              

rpt.Close();

0 Kudos

Look in the CR Help file and search on IsNull, you need to test it as well as a blank string.

Don

PS SQL Server is still a valid issue. It may work now but if MS updates something and no longer supports MDAC DB drivers your reports will fail again.

Good luck

Don