blob: ca0fd8abf5cf6a9063f5f854233cdfdb67e55d2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System.Collections.Generic;
using System.Windows.Forms;
using PlayingWithActiveReports.Core.Dto;
namespace PlayingWithActiveReports.Win.UI {
public partial class SimpleReportView : Form {
public SimpleReportView( ) {
InitializeComponent( );
SimpleReport report = new SimpleReport( );
report.DataSource = CreateDtosList( );
report.Run( false );
this.uxReportViewerControl.Document = report.Document;
}
private IEnumerable< DisplayReportQuestionDto > CreateDtosList( ) {
List< DisplayReportQuestionDto > dtos = new List< DisplayReportQuestionDto >( );
dtos.Add( new DisplayReportQuestionDto( "How are you?", "good" ) );
dtos.Add( new DisplayReportQuestionDto( "How old are you?", "23" ) );
return dtos;
}
}
}
|