Showing posts with label interface. Show all posts
Showing posts with label interface. Show all posts

Wednesday, March 7, 2012

Get sql statement for parameter through reporting service

hi,

i'm creating a winform application that communicates with a reporting service server through the SOAP interface.

If a user selects a report and presses a button a generic screen is created where I create all winforms controls like datetimepicker(if parameter type is DateTime) or combobox (if parameter type is String). When the parameter value is String and there are DefaultValues I add every value to the combobox. But when it has no DefaultValues and thus is generated through SQL I want the SQL statement but I can't find that property. Her you got the code to make it more comprehensive.

[CODE]
else if (rp.Type.ToString() == "String")
{
ComboBox combobox = new ComboBox();
ValidValue[] values = rp.ValidValues;
if (values == null)
{
String sqlString =
}
else
{
foreach (ValidValue value in values)
{
combobox.Items.Add(value.Label.ToString());
}
}
VerControl += 30;
combobox.Location = new Point(HorControl, VerControl);
combobox.Width = 200;
this.Controls.Add(combobox);
}
[/CODE]
hope you can help

greetings
Never mind. When asking for the report parameters I changed the boolean ForRendering to true so I get the values for SQL based parameters too! I don't have the sql statement but i get the values that I need