hassan razeghi
hassan razeghi

Reputation: 1

I want to get a report from Data Grid I send the information from the data grid to Smoothiesoft variables But it shows an error

I want to get a report from Data Grid in c# windows form I send the information from the data grid to Stimulsoft variables But it shows an error. I tried to solve it but failed.

why show this error?

System.ArgumentException: 'Option not supported. Parameter name: direct' in stimul soft

string report_path = app.projectDir + @"\bin\Debug\Reports\Report_InputStore.mrt";

StiReport report = new StiReport();
report.ScriptLanguage = StiReportLanguageType.CSharp;
report.Dictionary.Databases.Clear();
report.Load(report_path);
var dataTable = new DataTable();
dataTable.Columns.Add("ShipNum");
dataTable.Columns.Add("Ptitle");
dataTable.Columns.Add("code_product");
dataTable.Columns.Add("attrValue");
dataTable.Columns.Add("company_name");
dataTable.Columns.Add("saveDate");
dataTable.Columns.Add("Pcount");
dataTable.Columns.Add("countAttr");
dataTable.Columns.Add("Psize");
dataTable.Columns.Add("PsizeAttr");
dataTable.Columns.Add("introduction");
foreach (DataGridViewRow row in DGVprintOutput2.Rows)
{
  dataTable.Rows.Add(row.Cells["ShipNum"], row.Cells["Ptitle"], row.Cells["code_product"],     row.Cells["attrValue"], row.Cells["company_name"],
             row.Cells["saveDate"], row.Cells["Pcount"], row.Cells["countAttr"], row.Cells["Psize"], row.Cells["PsizeAttr"], row.Cells["introduction"]);
}
StiVariable dateVar = new StiVariable("DateDay", "todayDate", typeof(string), thisdate, false);
report.Dictionary.Variables.Add(dateVar);
report.RegData("DS-inputStore", dataTable);
report.Render(false);
report.Show();

Upvotes: 0

Views: 58

Answers (0)

Related Questions