我想要查詢報告參數的隱藏/顯示狀態。但似乎沒有任何財產可以說明這一點。報告參數隱藏/顯示查詢,在MS SSRS報告Web服務2010
我使用了報表服務2010,而不是reportviewer控件。 http://msdn.microsoft.com/en-us/library/reportservice2010.itemparameter.aspx
下面是我的代碼:
public class ReportingService
{
private ReportingService2010 reportingService = null;
public ReportingService()
{
reportingService = new ReportingService2010();
reportingService.Credentials = CredentialCache.DefaultCredentials;
}
internal IList<ReportParameter> GetReportParameter(string reportUrl)
{
string historyId = null;
bool forRendering = false;
ParameterValue[] values = null;
DataSourceCredentials[] credentialses = null;
ItemParameter[] parameters = null;
try
{
parameters = reportingService.GetItemParameters(reportUrl, historyId, forRendering, values, credentialses);
foreach (var parameter in parameters)
{
//parameter.Name;
//parameter.Prompt;
//parameter.DefaultValues.FirstOrDefault();
//Problem:
//how to get the show/hide status of the parameter.
//the PromptUser returns true only when both hide and prompt
//are false, but when hide is true, it return true.
//The rdl is edited via IE. It can be also edited via BI, and others.
}
return reportParameters;
}
catch (SoapException e)
{
throw;
//e.Detail.InnerXml.ToString();
}
}
}
任何想法將是非常非常感謝!
謝謝您的郵件。沒有這樣的財產。我使用了報表服務2010,而不是reportviewer控件。 http://msdn.microsoft.com/en-us/library/reportservice2010.itemparameter.aspx – Pingpong
對不起,我的錯。 – PaulStock