本文整理汇总了C#中ReportViewer.GenerateFromGridView方法的典型用法代码示例。如果您正苦于以下问题:C# ReportViewer.GenerateFromGridView方法的具体用法?C# ReportViewer.GenerateFromGridView怎么用?C# ReportViewer.GenerateFromGridView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReportViewer
的用法示例。
在下文中一共展示了ReportViewer.GenerateFromGridView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
var reportViewer = new ReportViewer();
reportViewer.HeaderWidthPercent = 100;
reportViewer.ContentWidthPercent = 100;
reportViewer.RowsPerPage = 30;
reportViewer.HeaderContent = string.Format("<center><h2>Daily Collection Report for the Date of {0:dd/MM/yyyy} of {1}</h2></center>", this.dtValue.Text, ApplicationElements.loggedInEmployee.LoginId);
reportViewer.GenerateFromGridView(this.dgvServiceReport, false);
reportViewer.Show(this);
}
示例2: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
if (cmbServiceType.SelectedIndex != 0)
{
var reportViewer = new ReportViewer();
reportViewer.HeaderWidthPercent = 100;
reportViewer.ContentWidthPercent = 100;
reportViewer.RowsPerPage = 30;
//reportViewer.HeaderContent = string.Format("<h2 style='margin-left:100px'>Daily Collection Report for the Date of {0:dd/MM/yyyy}</h2>", this.dtpFromDate.Value);
reportViewer.HeaderContent = string.Format("<div style='float: left; width: 350px;'>Date : {0: dd-MM-YYYY} </div>", dtValue.Text);
reportViewer.GenerateFromGridView(this.dgvServiceReport, false);
reportViewer.Show(this);
}
else
MessageBox.Show("Please select a service type..");
}
示例3: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
var reportViewer = new ReportViewer();
reportViewer.HeaderWidthPercent = 100;
reportViewer.ContentWidthPercent = 100;
reportViewer.RowsPerPage = 30;
var duration = dtToValue.Value - dtFrmValue.Value;
if (duration.Days > 0)
{
reportViewer.HeaderContent = string.Format("<center><h2>Daily Collection Report from {0:dd/MM/yyyy} to {1:dd/MM/yyyy}</h2></center>", this.dtFrmValue.Value, this.dtToValue.Value);
}
else
{
reportViewer.HeaderContent = string.Format("<center><h2>Daily Collection Report for the Date of {0:dd/MM/yyyy}</h2></center>", this.dtFrmValue.Value);
}
//reportViewer.HeaderContent = string.Format("<h2 style='margin-left:100px'>Daily Collection Report for the Date of {0:dd/MM/yyyy}</h2>", this.dtFrmValue.Text);
//reportViewer.HeaderContent = string.Format("<div style='float: left; width: 350px;'>Date : {0: dd-MM-YYYY} </div>", dtFrmValue.Text);
reportViewer.GenerateFromGridView(this.dgvServiceReport, false);
reportViewer.Show(this);
}