This is a migrated thread and some comments may be shown as answers.

Not defined in the current context...

7 Answers 1580 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Geoff
Top achievements
Rank 1
Geoff asked on 25 Nov 2011, 12:25 PM
Hi there

We have a simple report that works fine when tested in the development environment but when we publish it we get a red error box on every databound field saying....

'The expression contains object <field_name> that is not defined in the current context'

What is strange is we have dozens of other reports in the same library that all work fine.

Can anybody point me at what we are doing wrong as I am struggling to understand why this report fails when it is published.

We are using Q1 20111.

Any help greatly appreciated.


7 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 25 Nov 2011, 12:50 PM
Hello Geoff,

The error 'The expression contains object <field_name> that is not defined in the current context' means that the reporting engine cannot find such field in your database. Since it is working on your dev machine, most likely the report cannot connect to data i.e. either the database used as data source for this report does not exist on your server or the specified connectionString is not valid. Make sure that the connectionString you've saved in the app.config of the class library holding the reports exists in the configuration file in your actual application.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Geoff
Top achievements
Rank 1
answered on 25 Nov 2011, 02:43 PM
Thank you Steve - problem solved.

Was a connection string problem.

Many thanks for your quick reply.

All the best

Geoff
0
Alejandro
Top achievements
Rank 1
answered on 13 Feb 2015, 03:45 AM
Hola.

Mi problema es que tengo diseñado un Telerik Report con el diseñador Q3 2012, en el cual uso funciones de usuarios, en el preview del diseñador sale bien, ya en la aplicación (Web Form) cuando visualizo el reporte me da error en textBox que llama a la función, cómo resuelvo esto. Un Saludo.
0
Stef
Telerik team
answered on 13 Feb 2015, 04:51 PM
Hi Alejandro,

The official language used for our correspondence and in forums is English, so we would appreciate if you continue this discussion in English.

On your question, check if the values passed to the user function corresponds to its signature - The expression contains undefined function call MyUserFunction() error. Also if user functions are built in an external assembly, the start project must be configured with the steps from Deploying trdx (XML report definition) that uses external assembly.

If you need further help, please elaborate on the settings in your report and the created user function.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alejandro
Top achievements
Rank 1
answered on 13 Feb 2015, 05:14 PM
Hi, Thank by Answer me, sorry my English is poor. I Fixed the problem, Only add configuration of Designer in web.config in my app and  myCustomFunctions.dll in bin directory and WALA!!!!



0
William
Top achievements
Rank 1
answered on 13 May 2015, 01:15 PM

Hi Steve! I am getting the same error with telerik reporting for asp.net 2.0!

Well basically we use telerik reporting to produce some 32 pages profiles (reports) , and every once in a while I am getting the error like the one above printed in the last pages of our document. So this error happens randomly and I was wondering if you guys have a solution to mitigate this error. Is the a way I can detect this error in my VB code, to redo the report (this usually rectifies the error) before publishing it? 

 

Thanks in advance!

 

Will

 

 

0
Stef
Telerik team
answered on 14 May 2015, 07:36 AM
Hi Will,

The error indicates that you are using fields not existing in the currently loaded data.

Please download and install the latest available Telerik Reporting Q1 2015 Sp1 internal build v9.0.15.422 from your Telerik account - Products & Subscriptions - Latest internal builds - Reporting. Then run the Upgrade Wizard in all projects having referencees to Telerik Reporting.

If the problem still occurs, please use your support ticket on the same question to send us the problematic report's definition.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Geoff
Top achievements
Rank 1
Answers by
Steve
Telerik team
Geoff
Top achievements
Rank 1
Alejandro
Top achievements
Rank 1
Stef
Telerik team
William
Top achievements
Rank 1
Share this question
or