Dear Sir, I have a report to my application, I make the report reference from StrataFlix, but not work. when the report Viewer display show the error message: "An error occured during local report processing. The report definition for report 'pis.Reports.CustomerListing' has not been specified"
I don't know where coding is wrong. Can you help me solve this problem?
====ReportEngine====
Private Shared Function GetReportDataSource(ByVal report As PisReports) As IReportDataSource
'-- Establish Locals
Dim r As IReportDataSource = Nothing
Select Case report
Case PisReports.CustomerListing
r = New Reports.CustomerListing.CustomerListingDataSource()
Case PisReports.CustomerProfile
' r = New Reports.MovieProfile.MovieProfileDataSource()
Case PisReports.PeopleProfile
' r = New Reports.PeopleProfileReport.PeopleProfileDataSource()
End Select
'-- Return the results
Return r
End Function
#End Region
#Region " Public Methods "
''' <summary>
''' Runs the specified report
''' </summary>
''' <param name="report"></param>
''' <remarks></remarks>
Public Shared Sub RunReport(ByVal report As PisReports)
'-- Establish Locals
Dim f As New ReportViewer()
Dim rpt As IReportDataSource
'-- Get the data source for the report
rpt = GetReportDataSource(report)
'-- Populate the data source
If rpt.PopulateDataSource() Then
'-- Run the report
f.RunReport(rpt.LocalReport)
f.ShowDialog()
End If
End Sub
=========populate DataSource===
Public Overrides Function PopulateDataSource() As Boolean
'-- Establish Locals
Dim r As Boolean = True
Dim CustomerBrw As New pis.BrowseDialogs.CustomerBrowseDialog
' Dim CustomerBrw As New StrataFlix.UI.BrowseDialogs.MoviesBrowseDialog()
'-- Set the BO to populate
CustomerBrw.BusinessObjectToPopulate = Me.DataSource.SourceBO
'-- For this instance, force the focus to the results after the query so that the
' OK button will come on if there are any results in the list
CustomerBrw.SetFocusToResultsAfterSearch = True
'-- Change the header title
' movieBrw.HeaderTitle = "Movie Listing"
'-- In this case we are just using the Movie Browse to populate the source BO. But
' a custom dialog could just as easily be shown instead.
If CustomerBrw.ShowDialog() = Windows.Forms.DialogResult.OK Then
'-- Force the sort to title name
Me.DataSource.SourceBO.Sort = "custno"
'-- Set the report information
Me.LocalReport.DisplayName = "Customer Listing"
Me.LocalReport.ReportEmbeddedResource = "Pis.Reports.CustomerListing"
'-- Create the LocalReport data sources
Me.LocalReport.DataSources.Add(New ReportDataSource("Source", Me.DataSource))
'-- Indicate that the data source was populated
Return True
Else
'-- There is no reason to continue since the browse was cancelled
Return False
End If
End Function