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

New Report

2 Answers 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 12 Jun 2009, 08:49 PM
Everyone,

I am trying to add a report generation system to my web site.  I am trying to use the trial version of Telerik Reporting to see if it can do what I need it to do.  I am using Visual Studio 2008 and Framewrok 3,.5.  I have a report class created and a report viewer on my web page.  I get my data table from WCF and assign it to the report.  The report displays with headings but no data rows.  I have used '=FieldName" and "=Table.FieldName" in the text boxes to no avail.  My code is simple:

 

Dim objMainReport As Telerik.Reporting.Report = New RequestsByDate()

 

objMainReport.DataSource = dsTemp.Tables(0)  '-- table is available here

ReportViewer1.Report = objMainReport

ReportViewer1.DataBind()

I know that it is probably something to do with my RequestsByDate class, but I really have no clue.  Any help would be appreciated.

Thanks in advance,

Mark

2 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 12 Jun 2009, 09:13 PM
I found my issue.  I needed to set the DataSource of the Table and not just the Report itself.  I added the following code in the RequestByDate report class:

 

Private Sub RequestsByDate_ItemDataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ItemDataBinding

 

    table1.DataSource =

Me.DataSource

 

 

End Sub

 


After adding this, the data appeared.  Maybe this can help others.  Thanks!


0
Michael Love
Top achievements
Rank 1
answered on 09 Oct 2009, 05:01 PM
Thanks Mark. This helped me out!
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Michael Love
Top achievements
Rank 1
Share this question
or