12
votes

My SSRS report contains 7 input parameters and while running my report the size of the parameter(i.e. length) is increasing.

One of my input parameter(drop down list) may contain 100 characters so the size is not constant but i want to place all parameters in 2 lines or 3 lines(in a row).

Now it is coming 2 parameters per a row

Please advice

5

5 Answers

8
votes

As gbn indicates, it's not easy to change the built in report server method of presenting the parameters. SSRS likes to always use two parameters per line, presented in the order that they exist in the report (which must match the dependency order.)

So the alternatives that gbn mentions: Both involve building a "Wrapper" application: some custom code or a web page that you can code however you like to get the parameters. Then you call Reporting Services, either in code or by passing a formatted URL with your parameters. The report can be displayed in a frame, new window, or passed as a stream to where ever you'd like.

The URL access is pretty straightforward and reliable: I often use it either by hand (to create "favorites") or in code.

http://msdn.microsoft.com/en-us/library/ms153586.aspx

For what you are looking for, these might be more work than you expected, but they will be extremely flexible for your interface.

Jamie

5
votes

You can certainly do that, just right click on the RDL file in the solution explorer and select view code. then move the XML tags named <ReportParameter Name="Nameofparameter"> under <ReportParameters> according to where ever you want to position. And then save it. thats it!!!

The report parameters are kind of floating in values of 2, so if u have 4 report parameters then it will be shown as 1,2 next line 3,4. Best of luck!!

4
votes

Use ASP.NET for the paramaters and a ReportViewer control or URL access to render. Seriously.

I don't know of any option to present parameters any way other then the default

2
votes

I believe you could try using jQuery. The report parameters are rendered in a table under a div tag with class sqlrv-ParameterContainer. Write a jQuery or JavaScript function that will extract the full innerHTML from this div ie. the table content and then extract the table row information like the <label> or <input> tags.

Create your desired table structure with <table><tr><td>{extracted sections}</td><td></td></tr></table> or leave it to your requirement...

Then just append this new HTML structure in place of the original default structure.

In jQuery it will be like

$(".sqlrv-ParameterContainer").html();

which will give you the entire table structure that comes inside the parameter. Use XML parsing and get the input controls and all. Extract these controls as-is, don't change anything.

$(".sqlrv-ParameterContainer table").remove(); // it will remove the SSRS rendered default table from DOM

$(".sqlrv-ParameterContainer table").appendChild('<table><tr>......</tr></table>'); // Append your custom html structure here....

This was something that came to my mind quickly... I would suggest you test it... :)

0
votes

This doesn't help the OP with SSRS-2008 but in case it helps others - Microsoft have improved this in SSRS 2016 - parameters can now be easily managed via the GUI in Report Builder / Visual studio:

https://www.intertech.com/ssrs-parameters-2016-update/