簡體   English   中英

Web服務中缺少參數

[英]Missing Parameter in Web Service

我目前正在使用Web服務從Crystal報表檢索pdf文檔。 由於報表中沒有參數值,因此該服務運行良好。 一旦在查詢中使用參數,就無法再顯示報告,並且會檢索到“缺少參數值”之類的錯誤。 但是只有一個參數,我很確定我設置了該參數的值...這是更改/添加值的代碼:

// param is a string like 'parametername:value'
string index = param.Split(':')[0];
string value = param.Split(':')[1];
// repDoc is the current Report
repDoc.ParameterFields[index].CurrentValues.Clear();
repDoc.ParameterFields[index].CurrentValues.AddValue(value);
// now i create the PDF as an HTTPresponse
repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, response, false, "Report");

我真的不知道為什么它不起作用...

嘗試調試是否真的設置了參數?

我確定!=我檢查了它

我發現了錯誤...在創建報告之前我做了一個repDoc.refresh()。似乎參數值以這種方式被刪除...在刪除“刷新”之后,一切正常:)

thx的幫助!

古志堅

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM