I've added a ReportViewer
in a WPF
app via the XAML
designer of my main window and I'd like to add an existing rdlc file to it.
I'd like my reportviewer to show an empty rdlc file (without the parameters) on startup, and later upon selecting a row from my datagrid (bound to an observablecollection) change its parameters accordingly and show the filled report definition instead of the empty one.
I'll make a button with the selected row as commandparameter and the relevant events and everything, I just need to be able to pass data to the report. I realize it is not an easy question so I'll try to simplify:
- How to add an existing rdlc file to a ReportViewer (MVVM, WPF) ?
- I push a button -> relevant command gets the item from my observablecollection as parameter (a row in my datagrid) -> How to pass the data parts of this item to the unfilled (or overwrite if filled of course) parts of the report?
I hope I've been clear. Thanks for the answer in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…