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

dev preview with needdatasource

5 Answers 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kmv
Top achievements
Rank 1
kmv asked on 27 Nov 2009, 03:33 PM


developing a report in vstudio should i be able to preview a report if i am using needdatasource to supply the data ?



thanks
kevin

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Nov 2009, 04:31 PM
Hi kmv,

The Preview would work for reports bound through NeedDataSource as well.

All the best,
Steve
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
kmv
Top achievements
Rank 1
answered on 30 Nov 2009, 04:37 PM
ok steve thanks for that ...


all i have to do now is figure out why my report wont display in the preview tab





regards
kevin
0
kmv
Top achievements
Rank 1
answered on 30 Nov 2009, 10:45 PM
steve


my report runs if i run the web application but in preview i get

An error has occured while processing Report '':
Object reference not set to an instance of an object.


any ideas


kevin
0
Accepted
Steve
Telerik team
answered on 01 Dec 2009, 07:29 AM
Hello kmv,

Are you by any chance using web site and host the reports within the App_Code folder? If this is the case, then it is expected that Previews do not work due to limitation of the web site projects. We recommend using a separate class library to hold your reports and reference that class library in your web/win application.
If this is not the case, please share more info about your exact scenario (what is your datasource, where is it located etc.).
Please note that Telerik Report Designer operates inside the Visual Studio application. When previewing a report, the project that contains the report is compiled (if needed) and the report class is instantiated through Reflection, and passed to the previewer. This means that the report constructor is executed in the context of the Visual Studio application and the report that is previewed will get all connection strings defined in the devenv.exe.config file.
Obviously this is not the right configuration file that one may expect, so the trick is to use the application settings. This is what the Report and Data Source Wizards actually do when instructed to save the selected connection string in the config file.

If you are still having problems, please open a support ticket and attach a sample application (or your actual one) showing the problem at hand.

Regards,
Steve
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
kmv
Top achievements
Rank 1
answered on 01 Dec 2009, 08:47 AM
steve


thanks for that explanation really useful, unfortunately my report is in a class library in a web application. I have a commented in line for the data source (a SQL server DB) and am using a linq statement i my needdatasource.

as per your recommendation i will play around but if i get no where will put on a support ticket



thanks
kevin
Tags
General Discussions
Asked by
kmv
Top achievements
Rank 1
Answers by
Steve
Telerik team
kmv
Top achievements
Rank 1
Share this question
or