Report parameter hide/show query, in MS SSRS Reporting Web Service 2010
I want to query the hide/show status of parameters of a report. But it seems there is no property that tells that. I used reporting service 2010, not reportviewer control. http://msdn.microsoft.com/en-us/library/reportservice2010.itemparameter.aspx Below is my code: 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 parameer. //the PromptUser retursn true only when both hide and prompt are false. but when hide is true, it return true. //The rdl is editted via IE. It can be also editted via BI, and others. } return reportParameters; }catch(SoapException e) { throw; //e.Detail.InnerXml.ToString() } } } Any idea would be very much appreciated!
August 19th, 2011 11:23am

private bool IsShown(ItemParameter parameter) { return parameter.PromptUser && !string.IsNullOrEmpty(parameter.Prompt); }
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2011 4:59pm

private bool IsShown(ItemParameter parameter) { return parameter.PromptUser && !string.IsNullOrEmpty(parameter.Prompt); }
August 22nd, 2011 4:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics