How to change the SSRS input parameters position in report - ssrs-2008

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

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

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!!

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

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... :)

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/

Related

Adding preview option in cq:dialog?

Is it possible to add a session in cq:dialog which renders whatever data is supplied in the fields and previews it out in real time. In the simplest of scenarios, I need to add two numbers and when I enter both the numbers the cq:dialog should preview it's output as 4. There should be two sessions in the the cq:dialog, like two columns, the left one to enter value to the fields and the right to display the rendered output. How to achieve this? Is it possible to?
You can make use of "event handlers". Adobe docs has a simple example using JQuery that you can customize for your requirement.
https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html

Crystal Reports - suppress subreport parameter prompts

I have a Crystal report with several subreports linked on a common field - all working great. Now must add another, very complex, existing report as a new sub. This report's data source code stretches several pages. It also has over a dozen parameters which are further imbedded in numerous formula fields through out. That said, it runs fine and has a parameter that links with the main report. Unfortunately all the other parameter prompts is supremely annoying.
I've searched high and low for a method to accept default values without prompts but Crystal doesn't seem to accommodate that notion.
Revising the report to remove all the unneeded parameters would be extremely painful and simply not an option.
I'm hoping to find an alternate way to pass the parameter values to prevent the prompt. I'm aware of the SetParameterValue() method of the ReportDocument class but not sure how to use it. I've found examples of how to use it with C#, VS, ASP.net, etc., none of which work for an end user like myself.
Could the data source command itself be used?
Much thanks for any recommendations, guidance or thoughts!
With Command Level prompts, you would never be able to change the prompt values with the CR Viewer.
If the report is supposed to be viewed in the CR Viewer and you need the functionality or changing prompt values, try this:
1) Remove Command Level prompts
2) Create the Data prompt in the report from the Field Explorer
3) Create a Record Selection formula like this:
{date_field} = {?Date_prompt}
under Report > Selection Formulas > Saved data
4) Save the report with data
Try this...

Table of contents with page number - how to implement

Is it possible to implement Table of contents with page number on first page of the PDF report?
I've read the below links and refered in google:
1) http://community.jaspersoft.com/questions/541300/table-contents-ireport
2) http://community.jaspersoft.com/questions/529040/generation-page-numbers-table-content
On first link, They are using scriptlets for this. I want Table of contents with page number on the first page of pdf report. But I do not understand where to start. Any ideas?
I would recommend you checking this sample from the original documentation.
There is no way (or at least I don't know/haven't found how) to generate the Table of Contents at the beginning (since there is no way to know the pages numbers). So you will have to generate it at the end (in the summary band) and move it afterwards to where you want to place it. To move it use JasperPrint class, methods getPages, addPage, removePage.
I guess you will have subreports, if so, you need to pass the JRBeanCollectionDataSource you will be filling during runtime to each subreport (and return the value back to the master report).
Hope that helps.

Cascading input control is empty while accessing a Jasper Report

I call a jasper report through an independent URL through which I pass one of the input controls needed to run the report.
E.g. http:// localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&reportUnit=xyz&ParentFolderUri=abcd&j_username=xyz&j_password=xyz&parameter1=value1& . . .
As you can see in the above independent URL, I pass the JasperServer username and password, reportUnit name and location and other mandatory parameters, along with the report input parameter, i.e., "parameter1" which can have a value like "value1".
I used a mandatory, read-only and visible input control for this input value. Its value would come from the independent URL, showed in the box but was read-only and hence could not be changed.
The report was working absolutely fine upto this point.
But the tragedy began when my client rejected this idea. He wanted a completely invisible input control to my report and the input value would be passed through the independent URL, just like illustrated above.
And then my client asked me to refer to this and made me work on cascading input controls.
Recently I added a cascading input control to this report. The input control type is a single select query, which utilizes two parameters that I pass to the report through the independent URL.
Now when the Jasper server responds to the independent URL with the input parameters, all the other static parameters work properly, except for the cascaded one.
When I click the select box of the cascaded input, I can see the desired options for a second, and then, it just goes empty while I'm viewing the select list.
But when I make the "Parameter1" input control visible, the cascading input control works!
And then I turn in invisible, the cascading input control turns into a beast that does things by itself and not listen to his master.
I am not able to understand why this is happening. Could anybody please provide me a solution to this?
I have found a temporary solution for this.
I made the "Parameter1" input control visible and read only.
Next, I used a stylesheet and defined a style rule that would affect that input control's display on the web page, making "display: none".
I passed the name of the stylesheet through the URL. So this stylesheet is used for the report.
Now, the "Parameter1" input control is invisible to the end user and my report still runs with no one knowing it's just a fix.

Crystal Reports Check if export in formula

I want to add some text (from a formula) to my crystal report.
the thing is: I want this text only to be visible if I export the report to HTML for instance.
I don't want to see the text if I print the report.
Can it be done?
bye Juergen
Short answer: no. Crystal Reports, even v2008, doesn't have a mechanism to distinguish when it is being printed.
You could use a parameter field to set the field's visibility, but this will be a manual process.
You might be able to write a user-function library (UFL) to use the Windows API to determine the state of the document and return it to the report. The challenge would be to 1) find an API that can determine a document's print state 2) determine the report's 'handle'. I would go the c/c++ route for building such a UFL.
I don't think it's possible. The simplest way around your issue is to make 2 different versions of your CR report, 1 for HTML and 1 for printing.
A little redundant, yes, but it gets the job done.