I need some help with this samples.
I always become an InvalidCastException.
Code: Select all
private void PrintDataGrid(DataGrid sender)
{
DataView dataView = (DataView)sender.DataSource; // that causes the InvalidCastException
StiReport report = new StiReport();
report.ScriptLanguage = StiReportLanguageType.CSharp;
See the screenshot please.