Noob help - Loading a report from a SQL database & displaying it
Posted: Mon Jun 28, 2010 5:34 pm
I have just discovered Stimulsoft Reports and am fooling around with some samples to see if I can make this work, but so far I'm not having much luck. I'm sure I'm missing something very basic here.
I am trying to load up a report that just shows employee last names and first names from a SQL database table. In my WPF test application I am calling the following:
empHelp is a helper class, and GetEmployeesIEnum(ACTIVE) returns an IEnumerable list of active employees. When I debug this the program hangs on the RegData function. What am I doing wrong? The above code was basically lifted from the Stimulsoft example applications that I've downloaded. I know that GetEmployeesIEnum works because I've used that function on a DataGrid and the grid is filled in properly with data from my table.
The emplist.mrt report may be malformed, I suppose. All this report has is one data band that contains two columns: employee.lname and employee.fname. These are defined in a Dictionary data set for the report of type "User Sources." (that is, I didn't link the data source to our SQL DB, I just specified column names. I want to load these at run time).
Am I going about this the wrong way? If so, can someone point me to some help? Much appreciated.
I am trying to load up a report that just shows employee last names and first names from a SQL database table. In my WPF test application I am calling the following:
Code: Select all
private StiReport report = new StiReport();
public EmployeeWindow()
{
InitializeComponent();
report.Load("..\\..\\employee\\emplist.mrt");
report.RegData("employee", empHelp.GetEmployeesIEnum(ACTIVE));
report.ShowWithWpf();
}
The emplist.mrt report may be malformed, I suppose. All this report has is one data band that contains two columns: employee.lname and employee.fname. These are defined in a Dictionary data set for the report of type "User Sources." (that is, I didn't link the data source to our SQL DB, I just specified column names. I want to load these at run time).
Am I going about this the wrong way? If so, can someone point me to some help? Much appreciated.