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

Using existing classes to create report

2 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thomas Salt
Top achievements
Rank 1
Thomas Salt asked on 28 Aug 2009, 12:37 PM
Is it possible to use classes that were created in my web application to retrieve data for a report?  For example I have a class in the bin directory of my website called "MyClass" and there is a function in there called "MyDataset" which retrieves the exact data I want to have displayed in my report.  Do I have to copy the code from "MyClass.MyDataset" to the report project to use the code, or is there a way to reference the existing code that I have already created.  I cannot simply reference the app_code dll because it would create ambiguous namespaces when I reference the ReportLibrary in my Web app.

Thanks for the help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan
Telerik team
answered on 31 Aug 2009, 02:16 PM
Hello Thomas Salt,

We strongly recommend to move your shared business logic classes in a separate class library outside your main web site. Then you can easily reference the business logic library from both the report library and the web site. This will not only improve your project structure, but will help you cope with certain limitations imposed by the Visual Studio web sites (it seems you have already stumbled upon one such limitation yourself).
 

Best wishes,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Thomas Salt
Top achievements
Rank 1
answered on 31 Aug 2009, 04:42 PM
I assumed it had something to do with my design practices.  Thanks for the valuable tip.
Tags
General Discussions
Asked by
Thomas Salt
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Thomas Salt
Top achievements
Rank 1
Share this question
or