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

Table not showing data

1 Answer 451 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cheryl
Top achievements
Rank 1
Iron
Cheryl asked on 28 Feb 2014, 03:47 AM
Hello

I have a report that effectively needs three datasources, the second two that need to show in datatables, to be set via the calling webpage.
After some failed attempts, I decided to change them to sub reports but the lack of documentation on what exactly needs to be done from start to finish didn't help.

So I've gone back to the data tables as I had and thought I'd use the needdatasource for each of them and grab the data from a method that way rather than from the calling webpage.

Now in debug mode, this does appear to work - it does go into the needdatasource for each and it does show the data on the report correctly.

However, as soon as I publish, the two tables show without any data, just the layouts as if there isn't any data being found.

Here is my needdatasource for one of the tables:

Private Sub QuoteLines_NeedDataSource(sender As Object, e As EventArgs) Handles QuoteLines.NeedDataSource
Dim oQA As New Reports
 Dim dsQuoteLines As DataSet = oQA.Report_GetQuoteLines(Me.ReportParameters("QUID").Value)
 QuoteLines.DataSource = dsQuoteLines
End Sub


Any ideas??

thanks

1 Answer, 1 is accepted

Sort by
0
Cheryl
Top achievements
Rank 1
Iron
answered on 04 Mar 2014, 12:55 AM
I've managed to find a solution for this.

In my report I've using the mybase.itemdatabinding to force the needdatasource of the table to be hit:

Private Sub Report1_ItemDataBinding(sender As System.Object, e As System.EventArgs) Handles MyBase.ItemDataBinding
Dim processingReportQL = DirectCast(sender, Telerik.Reporting.Processing.Report)
Dim reportDefQL = DirectCast(processingReportQL.ItemDefinition, Telerik.Reporting.Report)
Dim tableQL As Telerik.Reporting.Table = DirectCast(reportDefQL.Items.Find("QuoteLines", True)(0), Telerik.Reporting.Table)
AddHandler tableQL.NeedDataSource, AddressOf QuoteLines_NeedDataSource

**** i'm also grabbing the parameters here and setting them to shared variables which I can then use in the needdatasource eg
QUID = processingReportQI.Parameters("QUID").Value


End Sub

and then my need datasource is using

Private Sub QuoteLines_NeedDataSource(sender As Object, e As EventArgs)  

Dim oQA As New Reports
 Dim dsQuoteLines As DataSet = oQA.Report_GetQuoteLines(QUID)
TryCast(sender, Telerik.Reporting.Processing.Table).DataSource = dsQuoteLines


End Sub

Tags
General Discussions
Asked by
Cheryl
Top achievements
Rank 1
Iron
Answers by
Cheryl
Top achievements
Rank 1
Iron
Share this question
or