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

Reporting Tutorial

12 Answers 647 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manon
Top achievements
Rank 1
Manon asked on 26 Jul 2007, 02:30 AM
Hi,

Can someone point me in the right direction?  I'm looking for a tutorial in how to use the Reporting tool.  I'm trying to design a report that will be ultimately accessed by a web page, and I'm having a frustrating time in trying to figure out how to define a datasource, etc.  The help files are helpful in telling you WHAT can be done, but not HOW to do it.  I've looked at the online demos as well, and that didn't help either.

Help?  Please?

12 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 26 Jul 2007, 11:00 AM
Hello Manon,

These are the steps to get you started:

  1. Create a new WebApplication project.
  2. Open Default.aspx in design-mode.
  3. Drag a ReportViewer control from the Visual Studio toolbox and drop it on the Default.apsx web form.
  4. Add new Telerik Report to the project and open it in design-mode.
  5. Click on the Report's DataSource property in the property grid in order to launch the Data Source Wizard.
  6. Select "Add Project Data Source".
  7. Select "Database".
  8. Click "New Connection".
  9. For server name enter ".\SQLEXPRESS" or the name of your SQL Server instance if different.
  10. If you have installed the examples, a sample database called "AdventureWorksT" was deployed to your SQL Server. Select it or select another database if you have one.
  11. After you are done with setting the database connection move to the next screen.
  12. Click "Query Builder" and build a query of your choice. For example, if you are connecting to the AdventureWorksT database, you can enter "Select * From Production.Product" as a query string.
  13. After the DataSourceWizard completes, select the newly created DataSet from the list of data sources.
  14. Click anywhere on the yellow surface around the sections to select the Report.
  15. Select Main Menu -> Telerik Reporting -> Data Explorer to show the DataExplorer Window. The columns form your query should appear in it.
  16. Select a column and drag it to the DetailSection of the Report. This will create a TextBox that is bound to that column. For example, if the column was called "Name", the Value of the TextBox will be "=Name". Drag and drop as many columns as you like and arrange the TextBoxes nicely in the DetailSection.
  17. Build the application.
  18. Go back to Default.aspx in design-mode, select the ReportViewer control and in the property grid click on its "Report" property. Select the Report that you added to the project.
  19. Run the application.
We hope that these basic steps will get you started. If you have further questions, please do not hesitate to ask. We will do our best to help.

Regards,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Vassil Petev
Telerik team
answered on 26 Jul 2007, 02:42 PM
Hi Manon,

This is a quick follow-up to your question.

The documentation contains a "Quick Starts" section which should give you the basics on how to get started. Feel free to use either the instructions posted here, or the one in the help. Once you create your report, you can review the  "Designing reports" section, which should help you learn the visual side of things.

For the next major version (early next year) we plan to offer a self-paced tutorial on how to use Telerik Reporting, similar to the one we have for ASP.NET.

We will be glad to answer any additional questions you may have on the usage of Telerik Reporting.


Best wishes,
Rob
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Manon
Top achievements
Rank 1
answered on 26 Jul 2007, 03:11 PM
Hi Rossen, Rob,

Thank you guys for this information.

I will try it later, and let you know if I have any more questions.  Although it looks like I might not need it...  :)

Manon
0
Rossen Hristov
Telerik team
answered on 26 Jul 2007, 03:33 PM
Sure, Manon, drop us a line if something pops up.
 

Sincerely yours,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Manon
Top achievements
Rank 1
answered on 27 Jul 2007, 03:17 AM
Hi Rob, Rossen,

I followed the steps, first from the QuickStart on the online help, and then from the steps kindly provided by Rossen.  So far, no luck.  Where I get completely confused is at step 12 "Click Query Builder and build a query of your choice.  The problem is, after following all those steps and connecting on AdventureWorksT (as well as other databases such as SQL from a remote server, Access databases), all I get is a choice between a list of tables or views in a treeview.  I selected the product table from the database and clicked Finished (only available option besides Cancel or Previous), and that created an .xsd file in the App_Code folder.  When I click again on the DataSource property of the report, my only choice is to go through the wizard again.  It doesn't even see the dataset I created from the product table (the .xsd file).

Yesterday I was able to create a dataset and put a couple of fields on the report (although I can't recreate what I did at all), but I was unable to link that report to the report viewer. 

A tutorial like the one for your ASP.Net suite would be really helpful for people like me who have little experience in web reporting. 

Thanks,

Manon
0
Rossen Hristov
Telerik team
answered on 27 Jul 2007, 07:54 AM
Hi Manon,

The problem is caused from the fact that your report is in a WebSite project. I forgot to mention that, for which I am sorry.
The data source wizard has some issues when used in a WebSite project.

The Web Site project introduced with Visual Studio 2005 differs from all other project types quite a bit and is very specific. We advice our clients, if possible, to try separating the reports from the Web Site project and put them in a class library that the Site should use/reference.

Another possible solution is to use the old Web Application project that is available in the VS2005 with SP1.


 
Best wishes,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Manon
Top achievements
Rank 1
answered on 27 Jul 2007, 03:34 PM
All right.

If I understand this correctly, I can't define my report with Telerik's tool in my website project.  I'll have to define them, say, and a VB project (VB is what we use as code-behind), and put them in a class library (just the .vb files, or do I have to compile them in some way?) and then bind them in my reportviewers on my website project?

I'm off to try this.  Will let you know how that goes.

Thanks,

Manon
0
Rossen Hristov
Telerik team
answered on 27 Jul 2007, 03:44 PM
Hi Manon,

You should add the reports in a Class Library project and then add a reference to that project to your Web Site References so that the Web Site "sees" the reports. When you rebuild the solution, your ReportViewer will be able to "see" all reports defined in the Class Library project when you click its "Report" property. Then simply choose the report that you want to display in the viewer.

Sincerely yours,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Manon
Top achievements
Rank 1
answered on 27 Jul 2007, 03:53 PM
Hi Rossen,

I started a VB project and created a new Telerik report.  I went through the steps for creating the datasource, but again, I could only see Tables and Views.  However, contrary to the website project, I was able to choose a datasource from the single table that I picked in the earlier step.

When I get a report done, I'll go ahead with the class library project.  But I this point, I can't get a report from a query, only a single table, and I don't want to have to create views for all my reports!  From your understanding of my problem, do you think I should re-install VS2005, or is there some configuration somewhere that I should do?

Thanks,

Manon
0
Rossen Hristov
Telerik team
answered on 27 Jul 2007, 04:21 PM
Hello Manon,

In the current version, the data source wizard shows only tables and views, but we are already working on the functionality that you need, i.e. writing your own query. It will be available in the next service pack.

However, you still can define your own query, but you need to use a SqlDataAdapter to do that. Drag an SqlDataAdapter from the toolbox onto a Report. If it is not in the toolbox, add it, since in VS2005 it is not visible by default. When you drop the SqlDataAdapter on the report, its wizard will be launched. There you will be able to specify the connection and query. After you complete the wizard, click the DataSource property of the report and select the newly created adapter. There is an article about that in the online documentation.

As for the projects -- I think that you have already done what is needed.

Please see our sample solution from "Start -> Programs -> Telerik -> Reporting 1.0 -> Examples -> VB.NET -> Load sample solution in Visual Studio".

This solution has 3 projects:

VB.ReportLibrary -- the ClassLibrary containing all the reports.
VB.WinDemo -- a Windows Forms application containing a WinViewer.
WebDemo -- a WebSite containing a WebViewer.

Both VB.WinDemo and WebDemo reference VB.ReportLibrary and show the reports within it. In this way you can share reports between different applications. That is why we recommend that project architecture.

Sincerely yours,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Manon
Top achievements
Rank 1
answered on 27 Jul 2007, 06:15 PM
Thanks for all your help, Rossen.  I'll follow these instructions.

Manon
0
Rossen Hristov
Telerik team
answered on 30 Jul 2007, 08:20 AM
Hello Manon,

If you have any other questions, do not hesitate to contact us again.

Sincerely yours,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Manon
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Vassil Petev
Telerik team
Manon
Top achievements
Rank 1
Share this question
or