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

Access the Report datasource from inside user defined function

4 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 24 Nov 2008, 08:09 PM
I noticed that we have the ability to access the datasource of a report (which in our case is a dataset that we set outside of the report) from inside functions like ItemDataBound, etc. How do we access the datasource from inside of User Defined Function that we create inside of the report for use when the report is rendering?

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Nov 2008, 11:48 AM
Hello Adam,

This is not a very good idea due to specifics of our Reporting engine. Can you elaborate why would you need such a functionality? What will it cover that cannot be achieved with the existing resources?

Greetings,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Adam
Top achievements
Rank 1
answered on 03 Dec 2008, 01:48 PM
The reason we now need to access the data source is because with 2008 Q3 the code from this forum post no longer works for us.


We noticed that you have the code in the report header and we have ours in the group header. It used to work for us with Q2 but now with Q3, it's not longer able to find the textboxes and therefore can't figure out how many of them are on the report to do it's calculations.

Thanks,
Adam
0
Steve
Telerik team
answered on 03 Dec 2008, 01:57 PM
Hello Adam,

As can be seen from my last reply, I've tested this with Q3 and it works as expected on my end. Can you share what exactly is not working? Using the exact report I've attached should work with both Q2 and Q3 - please download and use it as is and once you have it working on your end, you can try modifying it to suit your need.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Adam
Top achievements
Rank 1
answered on 16 Dec 2008, 09:11 PM
It appears we have found the problem. One of the objects in the sample code was made obsolete, however, it didn't show up as obsolete until SP1 came out for the reports. Once we put SP1 on and found what replaced the obsolete object, we were able to change it and everything appears to be working correctly now.
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Steve
Telerik team
Adam
Top achievements
Rank 1
Share this question
or