Reputation: 119
I have a .net core project which cotains a report viewer on a blazor page and I'm trying to bind it to a data source without success
<div style="width: 100%; margin: auto;">
<DxDocumentViewer ReportUrl="PatientPending" Height="800px" Width="100%" @ref="Report">
<DxDocumentViewerTabPanelSettings Width="180" />
</DxDocumentViewer>
</div>
This is my data source
[DisplayName("PatientPending")]
[HighlightedClass]
public class PatientPendingDataSource {
public PatientPendingDataSource() {
}
[HighlightedMember]
public IEnumerable<Patient> GetData() {
return new List<Patient> {
new Patient {
Id = 5
},
new Patient {
Id = 6
},
};
}
}
The datasource of this report is typeof(PatientPendingDataSource) and the datamember to "GetData" I've set a breakpoint on the GetData method but it's never reached, what am I doing wrong?
Upvotes: 0
Views: 716
Reputation: 146
The Document Viewer in Blazor apps obtain reports from report storage. Thus, you need to locate this report into storage and specify only the ReportUrl
property. When binding this report to IEnumerable<Patient>
make sure that you've checked the following entries in the data source wizard and then your method should be called at runtime:
Upvotes: 0