Access the Report datasource from inside user defined function

5 posts, 0 answers
  1. Adam
    Adam avatar
    177 posts
    Member since:
    Oct 2012

    Posted 24 Nov 2008 Link to this post

    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?
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 27 Nov 2008 Link to this post

    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.
  3. DevCraft banner
  4. Adam
    Adam avatar
    177 posts
    Member since:
    Oct 2012

    Posted 03 Dec 2008 Link to this post

    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
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Dec 2008 Link to this post

    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.
  6. Adam
    Adam avatar
    177 posts
    Member since:
    Oct 2012

    Posted 16 Dec 2008 Link to this post

    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.
Back to Top
DevCraft banner