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

Async

1 Answer 266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
siva sankar
Top achievements
Rank 1
siva sankar asked on 25 Mar 2013, 07:29 AM

Hai 
     
When I was takeing Data as below Report Showing output  Data.  

public
static List<Job> GetData(int ab)

{
}

but when  I was takeing data as below

 

public async static Task<List<Job>> GetData(int ab)
{
}

it was showing Error    The expression contains object 'JobName' that is not defined in the current context.



Is Telerik Reports support async methods ?

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 27 Mar 2013, 03:17 PM
Hi Siva,

You cannot use an async method as data source. The whole point of the async methods is to be able to await a result and while you are waiting to continue executing some other code. Therefore it makes much more sense to await the result and then create the ObjectDataSource, assign it to the report and then add the report to the report viewer and refresh it.

If this does not help you please elaborate on your issue.

All the best,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
siva sankar
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or