problem with report viewer print button.
Posted: Tue Nov 22, 2016 5:02 pm
hi.
I make a report by following code.When I print button in viewer report clear.
I use : bootstrp , stimul 2012
MY CODE :
string SMIDs = "";
string WH = MakeWhere(Where,ref SMIDs);
DataTable MasterPrint = new ServiceDAL().GOAllServiceMaster_DT(WH);
DataTable DetialsPrint = new ServiceDAL().GODetialsRecords_DT(" AND ServiceDetials.FKIDService IN(" + SMIDs + ")");
DataTable BandPrint = new BaseInfo.BandsDAL().GoAll_DT(" AND Invoice=1 ");
DataTable company = new BaseInfo.CompanyDAL().GOSelect_DT();
Stimulsoft.Report.StiReport stiReport = new Stimulsoft.Report.StiReport();
stiReport.Load(HttpContext.Current.Server.MapPath("~/Reports/InvoiceSale.mrt"));
DataSet ds = new DataSet();
ds.Merge(MasterPrint);
ds.Tables[0].TableName = "Master";
ds.Merge(DetialsPrint);
ds.Tables[1].TableName = "Detials";
ds.Merge(BandPrint);
ds.Tables[2].TableName = "Band";
ds.Merge(company);
ds.Tables[3].TableName = "company";
stiReport.Dictionary.Clear();
stiReport.RegData(ds);
stiReport.Dictionary.Synchronize();
StiText lbluser = stiReport.GetComponents()["lbluser"] as StiText;
lbluser.Text.Value = Session["UserActive"].ToString();
StiText lbldatetime = stiReport.GetComponents()["lbldatetime"] as StiText;
lbldatetime.Text.Value = Session["TodayDate"].ToString() + " " + DateTime.Now.TimeOfDay.ToString("hh\\:mm\\:ss");
stiReport.Compile();
stiReport.Render();
StiWebViewer1.ResetReport();
StiWebViewer1.Report = stiReport;
I make a report by following code.When I print button in viewer report clear.
I use : bootstrp , stimul 2012
MY CODE :
string SMIDs = "";
string WH = MakeWhere(Where,ref SMIDs);
DataTable MasterPrint = new ServiceDAL().GOAllServiceMaster_DT(WH);
DataTable DetialsPrint = new ServiceDAL().GODetialsRecords_DT(" AND ServiceDetials.FKIDService IN(" + SMIDs + ")");
DataTable BandPrint = new BaseInfo.BandsDAL().GoAll_DT(" AND Invoice=1 ");
DataTable company = new BaseInfo.CompanyDAL().GOSelect_DT();
Stimulsoft.Report.StiReport stiReport = new Stimulsoft.Report.StiReport();
stiReport.Load(HttpContext.Current.Server.MapPath("~/Reports/InvoiceSale.mrt"));
DataSet ds = new DataSet();
ds.Merge(MasterPrint);
ds.Tables[0].TableName = "Master";
ds.Merge(DetialsPrint);
ds.Tables[1].TableName = "Detials";
ds.Merge(BandPrint);
ds.Tables[2].TableName = "Band";
ds.Merge(company);
ds.Tables[3].TableName = "company";
stiReport.Dictionary.Clear();
stiReport.RegData(ds);
stiReport.Dictionary.Synchronize();
StiText lbluser = stiReport.GetComponents()["lbluser"] as StiText;
lbluser.Text.Value = Session["UserActive"].ToString();
StiText lbldatetime = stiReport.GetComponents()["lbldatetime"] as StiText;
lbldatetime.Text.Value = Session["TodayDate"].ToString() + " " + DateTime.Now.TimeOfDay.ToString("hh\\:mm\\:ss");
stiReport.Compile();
stiReport.Render();
StiWebViewer1.ResetReport();
StiWebViewer1.Report = stiReport;