how to access the progressbar when export a pdf document?
how to access the progressbar when export a pdf document?
hi,
When I export a pdf document, there will be a progressbar with a cancel button on the screen.
How can I disable the cancle button, or can i implement a new progressbar without the cancle button?
Thanks.
When I export a pdf document, there will be a progressbar with a cancel button on the screen.
How can I disable the cancle button, or can i implement a new progressbar without the cancle button?
Thanks.
how to access the progressbar when export a pdf document?
Hello.
Thank you.
How do you call export? If with code then provide us part of your code.ethanshi wrote:When I export a pdf document, there will be a progressbar with a cancel button on the screen.
How can I disable the cancle button, or can i implement a new progressbar without the cancle button?
Thank you.
how to access the progressbar when export a pdf document?
Aleksey wrote:Hello.How do you call export? If with code then provide us part of your code.ethanshi wrote:When I export a pdf document, there will be a progressbar with a cancel button on the screen.
How can I disable the cancle button, or can i implement a new progressbar without the cancle button?
Thank you.
Aleksey:
Thanks for your reply, please help me review the following code:
StiReport report = new StiReport();
DataTable dt_data = ConvertHashToDatatabale(objHashTable);
report.Load(strTemplateFilePath);
dt_data.TableName = "dtContract";
report.RegData(dt_data);relay
/*Gen WaterMark*/
if (IsWaterMark)
{
for (int i = 0; i < report.Pages.Count; i++)
{
report.Pages.Watermark.Enabled = true;
report.Pages.Watermark.Text = "Draft";
}
}
else
{
for (int i = 0; i < report.Pages.Count; i++)
{
report.Pages.Watermark.Enabled = false;
}
}
/*Gen End*/
report.Render(true);
report.ExportDocument(StiExportFormat.Pdf, strOutputFilePath);
how to access the progressbar when export a pdf document?
Hello.
Please, try to use next code instead of report.ExportDocument(StiExportFormat.Pdf, strOutputFilePath);
Thank you.
Please, try to use next code instead of report.ExportDocument(StiExportFormat.Pdf, strOutputFilePath);
Code: Select all
StiPdfExportService service = new StiPdfExportService();
if (useProgress)
{
service.Progress = StiGuiOptions.GetProgressInformation(service.OwnerWindow, StiGuiMode.Gdi);
service.Progress.SetAllowClose(false); //disable Cancel button
service.Progress.Start(StiLocalization.Get("Export", "ExportingReport"));
service.ExportPdf(report, strOutputFilePath);
service.Progress.Close();
service.Progress = null;
}
how to access the progressbar when export a pdf document?
Hi,
Thank you for reply.
I've tried the code provided, but the progressbar is still there.
I find the progressbar appears when the application run to "report.Render(true);". I comment the code and then the pdf is not exported.
Here is my code:
report.Render(true);
//report.ExportDocument(StiExportFormat.Pdf, strOutputFilePath);
StiPdfExportService service = new StiPdfExportService();
service.Progress = StiGuiOptions.GetProgressInformation(service.OwnerWindow, StiGuiMode.Gdi);
service.Progress.SetAllowClose(false); //disable Cancel button
service.Progress.Start(StiLocalization.Get("Export", "ExportingReport"));
service.ExportPdf(report, strOutputFilePath);
service.Progress.Close();
service.Progress = null;
Thank you for reply.
I've tried the code provided, but the progressbar is still there.
I find the progressbar appears when the application run to "report.Render(true);". I comment the code and then the pdf is not exported.
Here is my code:
report.Render(true);
//report.ExportDocument(StiExportFormat.Pdf, strOutputFilePath);
StiPdfExportService service = new StiPdfExportService();
service.Progress = StiGuiOptions.GetProgressInformation(service.OwnerWindow, StiGuiMode.Gdi);
service.Progress.SetAllowClose(false); //disable Cancel button
service.Progress.Start(StiLocalization.Get("Export", "ExportingReport"));
service.ExportPdf(report, strOutputFilePath);
service.Progress.Close();
service.Progress = null;
how to access the progressbar when export a pdf document?
Hello.
Thank you.
Please use report.Render(false); code.ethanshi wrote:Thank you for reply.
I've tried the code provided, but the progressbar is still there.
I find the progressbar appears when the application run to "report.Render(true);". I comment the code and then the pdf is not exported.
Thank you.
how to access the progressbar when export a pdf document?
Hi,Aleksey wrote:Hello.Please use report.Render(false); code.ethanshi wrote:Thank you for reply.
I've tried the code provided, but the progressbar is still there.
I find the progressbar appears when the application run to "report.Render(true);". I comment the code and then the pdf is not exported.
Thank you.
I change to Render(false) and it works.
But the following code still pop up a progressbar.
Thanks for replay.
- Attachments
-
- 1616.progressbar.jpg (14.66 KiB) Viewed 2088 times
how to access the progressbar when export a pdf document?
Hello.
Sorry for the delay with response. We need some additional time to prepare the answer for you.
Thank you.
Sorry for the delay with response. We need some additional time to prepare the answer for you.
Thank you.
how to access the progressbar when export a pdf document?
Hello,
Sorry for the mistake. Please modify your code. For export with progressbar:
For export without progressbar:
Thank you.
Sorry for the mistake. Please modify your code. For export with progressbar:
Code: Select all
StiPdfExportService service = new StiPdfExportService();
service.Progress = StiGuiOptions.GetProgressInformation(service.OwnerWindow, StiGuiMode.Gdi);
service.Progress.Start(StiLocalization.Get("Export", "ExportingReport"));
service.Progress.SetAllowClose(false); //disable Cancel button
service.ExportPdf(report, strOutputFilePath);
service.Progress.Close();
service.Progress = null;
Code: Select all
StiPdfExportService service = new StiPdfExportService();
service.ExportPdf(report, strOutputFilePath);
how to access the progressbar when export a pdf document?
It works, Thanks for replay.