Hi All
I have created a grid
I have fetched the values from a table.
I have kept Three buttons (Export To Excel) (Export To Word) and (Export To Pdf)
While clicking the (Export To Excel) and(Export To Word) button I get a popup "File Download" "Do you want to save it or open with?"
But while clicking (Export To Pdf) Button this pop up does not appear. I want it to appear.
Here is my Coding for the three buttons
//This is for the (Export To Excel)
protected
void btnExcel_Click(object sender, EventArgs e)
{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.MasterTableView.ExportToExcel();
}
//This is for the (Export To Word)
protected void btnWord_Click(object sender, EventArgs e)
{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.MasterTableView.ExportToWord();
}
//This is for the (Export To Pdf
protected
void btnPdf_Click(object sender, EventArgs e)
{
ConfigureExport();
CheckBox1.Checked =
true;
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.ExportSettings.ExportOnlyData =
true;
rgvReport.MasterTableView.ExportToPdf();
}
//This function is just for the status
public
void ConfigureExport()
{
rgvReport.ExportSettings.ExportOnlyData = CheckBox1.Checked;
rgvReport.ExportSettings.IgnorePaging = CheckBox2.Checked;
rgvReport.ExportSettings.OpenInNewWindow = CheckBox3.Checked;
}
Advance Thank You
Regards,
Anto
I have created a grid
I have fetched the values from a table.
I have kept Three buttons (Export To Excel) (Export To Word) and (Export To Pdf)
While clicking the (Export To Excel) and(Export To Word) button I get a popup "File Download" "Do you want to save it or open with?"
But while clicking (Export To Pdf) Button this pop up does not appear. I want it to appear.
Here is my Coding for the three buttons
//This is for the (Export To Excel)
protected
void btnExcel_Click(object sender, EventArgs e)
{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.MasterTableView.ExportToExcel();
}
//This is for the (Export To Word)
protected void btnWord_Click(object sender, EventArgs e)
{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.MasterTableView.ExportToWord();
}
//This is for the (Export To Pdf
protected
void btnPdf_Click(object sender, EventArgs e)
{
ConfigureExport();
CheckBox1.Checked =
true;
rgvReport.ExportSettings.FileName =
"HourlyReport";
rgvReport.ExportSettings.ExportOnlyData =
true;
rgvReport.MasterTableView.ExportToPdf();
}
//This function is just for the status
public
void ConfigureExport()
{
rgvReport.ExportSettings.ExportOnlyData = CheckBox1.Checked;
rgvReport.ExportSettings.IgnorePaging = CheckBox2.Checked;
rgvReport.ExportSettings.OpenInNewWindow = CheckBox3.Checked;
}
Advance Thank You
Regards,
Anto