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

Passing web form data to report

1 Answer 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay H
Top achievements
Rank 1
Jay H asked on 26 Oct 2009, 01:11 PM
Hi all, I am new to Telerik reporting and have a few questions, English is not my first language so please excuse any language mistakes.

I went through some of the demo code, but I need to do more creation at runtime.

My example:

I have a web form with four textboxes/combo boxes. User enters the data, example is First Name of Mike, last name of Smith then some combo box selections. I pass the selected values to a query and generate a datatable. I do not wish to have the values on the report parameter section.

What I now need to do is display a report, and for all the results found from the query show it on the report. Example:
1. Product x on 1/1/2009
2. Product x on 1/2/2009
3. Product y on 1/2/2009
4. Product x on 1/3/2009

So it will loop through datatable and show all results. i have created a simple sample report with 1 textbox on it with a value of =Fields.Product_Name. I reference the report class in my web project and try to call it:
Dim report As New Reports.Product
        report.DataSource = dtOracle
        ReportViewer1.Report = report
        ReportViewer1.DataBind()

The reportviewer does not show anything on screen, multiple data rows are returned successfully into datatable. Does there need to be code in report itself to loop through datatable and display on screen?

Could someone please show me an example, I did not see what I am looking for in samples here. Example of a user entering data into webform, passing it to a report and displaying results. The creation of report needs to be at runtime.

Thanks for your assistance.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 Oct 2009, 04:53 PM
Hi Jay H,

Take a look at the following video that shows you similar implementation:

Design Time Support for Parameterized Queries

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.
Tags
General Discussions
Asked by
Jay H
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or