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

Switching Report to view

8 Answers 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
WCRA Dev
Top achievements
Rank 1
WCRA Dev asked on 26 Jul 2010, 06:04 PM
I have a page called Report.aspx that has the Telerik ReportViewer control on it.  During the OnLoad event of Report.aspx I would like to set the report that will be viewed.  How do I do this?

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Jul 2010, 02:29 PM
Hi Christian,

Please review the following help article for more information about assigning a report to the web report viewer: Embedding the Web Report Viewer on a Web Form.

Sincerely yours,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
WCRA Dev
Top achievements
Rank 1
answered on 27 Jul 2010, 03:07 PM
I've tried that code but I get this error:  Error   13   The type or namespace name 'Report1' could not be found (are you missing a using directive or an assembly reference?) 
0
Steve
Telerik team
answered on 30 Jul 2010, 12:19 PM
Hi Christian,

Please check whether you have added reference to the class library in your web site.

Regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
WCRA Dev
Top achievements
Rank 1
answered on 30 Jul 2010, 02:55 PM
How do I add the reference to the class library?  Which class library?
0
Steve
Telerik team
answered on 30 Jul 2010, 03:57 PM
Hi Christian,

It seems that we're missing the base here, so we would elaborate a bit more. As outlined in the Best Practices help article, one needs to create a class library that would hold the Telerik Reports. Then reference the class library in your web site, so you can use the reports in the viewer. Then follow the steps in the article from our very first post.
Step by step instructions on the above are available in the Quickstart help section.

Best wishes,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
WCRA Dev
Top achievements
Rank 1
answered on 04 Aug 2010, 04:06 PM
I created a class library called 'reports' and I added a reference to it (I've attached a screenshot of my project).  I'm no longer getting an error on this line:

Report report = new Report();

but now I get an error on:
report.DataSource = MyDataSource;

Error   35  'eMember.Report' does not contain a definition for 'DataSource' and no extension method 'DataSource' accepting a first argument of type 'eMember.Report' could be found (are you missing a using directive or an assembly reference?)   U:\Tech Dept\Development\eMember3\eMember\eMember\Report_DiaryLetters.aspx.cs   17  20  eMember
0
Steve
Telerik team
answered on 09 Aug 2010, 04:40 PM
Hello Christian,

As I can see from your screenshots, "reports" is not a class library but a web site project. Class library icon is different and it is not meant to hold aspx pages in it (see attached screenshot).
To avoid any further confusion, I've prepared a sample VS2010 solution that consists of a class library holding a report and web application that displays the report with the help of the Web Report Viewer.

Greetings,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Robert Dennyson
Top achievements
Rank 2
answered on 14 Mar 2011, 07:37 PM
Try this...
Tags
General Discussions
Asked by
WCRA Dev
Top achievements
Rank 1
Answers by
Steve
Telerik team
WCRA Dev
Top achievements
Rank 1
Robert Dennyson
Top achievements
Rank 2
Share this question
or