0
我試圖導出爲PDF水晶報表,然後通過電子郵件發送,但每次我到導出命令時,我得到一個ParameterFieldCurrentValue例外。與Crystal參數問題報告出口
我跟蹤的參數集合的值保持ReportDocument和值被設置在那裏。而且,所有四個參數都是字符串。第一個設置允許多個值以及離散值或範圍值。我調用的對話框爲該參數的可選選項設置值。沒有其他參數字段。在報告中有公式字段。
我的代碼是:
SelectionDialog sd = new SelectionDialog(null, null,
@"\\er1\common\bfi_apps\ReportMasterTwo\eds\custno.csv", true, false);
DialogResult dr = sd.ShowDialog();
string filename = @"c:\documents and settings\aap\desktop\salesanalysis.pdf";
if (dr == DialogResult.OK && sd.selectedVals != null)
{
for (int i = 0; i < sd.selectedVals.Count; i++)
{
ar100SalesABC_edcustom1.Parameter_Customer_Number.CurrentValues.AddValue
(sd.selectedVals[i]);
}
ar100SalesABC_edcustom1.Parameter_Fiscal_period.CurrentValues.AddValue("1");
ar100SalesABC_edcustom1.Parameter_Fiscal_year.CurrentValues.AddValue("2007");
ar100SalesABC_edcustom1.Parameter_Product_Type.CurrentValues.AddValue("F");
ar100SalesABC_edcustom1.ExportToDisk
(ExportFormatType.PortableDocFormat, filename); // ERROR HAPPENS HERE
// .. emailing code and other stuff
}
我在做什麼錯?有沒有其他方法可以做得更好?我試過導出選項,我試過SetParameter,我一直在收到這個錯誤。