Use StimulReport In ASP Mvc
Posted: Fri Sep 07, 2012 9:34 am
I'm trying to use stimulReport in my asp mvc project but I cant do it plz help me and guid me what must I do?
first I want to create a connection to sql server in design mode but there is no sql connection type (pic1)
so in controller i tried to add a data table in to report but there is no effect in my view
controller Code:
View code:
first I want to create a connection to sql server in design mode but there is no sql connection type (pic1)
so in controller i tried to add a data table in to report but there is no effect in my view
controller Code:
Code: Select all
public ActionResult GetReportTemplate()
{
StiReport report = new StiReport();
DataTable dt = new DataTable("test");
dt.Columns.Add("Id");
dt.Columns.Add("Name");
dt.Rows.Add("1", "Mahyar");
report.RegData(dt);
return StiMvcDesignerHelper.GetReportTemplateResult(report);
}
Code: Select all
@Html.StiMvcDesigner(new StiMvcDesignerOptions()
{
ActionGetReportTemplate = "GetReportTemplate",
AllowModifyDataSources = true,
AllowModifyConnections = true,
Width = Unit.Percentage(100),
Height = Unit.Pixel(700)
})