Note that there are some explanatory texts on larger screens.

plurals
  1. POExport directly to pdf
    primarykey
    data
    text
    <p>I am using two stored procedures, one for main report and another for subreport. Below is the code.</p> <pre><code> private void LoadSalesOrderReport() { string Type = gvQuotationDetails.Rows[QuoteIndex].Cells["Type"].EditedFormattedValue.ToString(); FilePath = ConfigurationManager.AppSettings["EMP_IMG_PATH"].ToString() + "\\" + ValQuoteID.ToString() + ".pdf"; DeleteExistingFile(FilePath); try { AccountsPayableMaster objAPM = new AccountsPayableMaster(); QuotationReport obj = new QuotationReport(); objReportDocument.Load(Application.StartupPath + @"\rptQuotationReport.rpt"); obj.crysQuotationReport.LogOnInfo = objAPM.ConnectionDetails("SD_SalesOrderReport;1"); obj.crysQuotationReport.LogOnInfo = objAPM.ConnectionDetails("SD_GetBatchReportDetails;1"); obj.crysQuotationReport.ReportSource = objReportDocument; objReportDocument.SetParameterValue("@QuoteID", ValQuoteID); objReportDocument.SetParameterValue("Type", "-" + Type.ToUpper() + "-"); objReportDocument.SetParameterValue("@QuoteID", ValQuoteID, objReportDocument.Subreports[0].Name.ToString()); string[] Print = objAPM.GetPrintDetails(); SetPrintParameters(objReportDocument, Print); obj.Show(); objReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, FilePath); } catch (Exception ex) { MessageBox.Show(ex.Message); } OpenPdfFile(); } private void OpenPdfFile() { try { Process.Start(FilePath); } catch (Exception ex) { MessageBox.Show("Please install MicrosoftOffice/Pdf Reader to view files", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } } </code></pre> <p>The code is working fine.But the problem is. when i click the button in front end to show the pdf directly.The crystal report form is also displayed and I know the reason as I am using <strong>obj.Show</strong> in my code.I tried to comment it but it throws an error.Can any one advise changes in my code to directly display the pdf and not the crystalreport form.</p> <p><img src="https://i.stack.imgur.com/gkW65.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload