Cascading input control is empty while accessing a Jasper Report - jasper-reports

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.

Related

How to link an Input Control to a report's Parameter

I'm unable to link an Input Control to my report's Parameter. I feel I'm doing right, but I can't see the desired result in the final report.
My intention is to create a list, filled by some options, and display the list in a report as a parameter, so the user can (multi)select the options. As far as I know, I must create an Input Control on the server, create a Parameter on the report using the same name between the Input Control and the Parameter.
I've created a List of Values named ListaCalificaciones as follows:
Then, this is the Input Control:
Finally, this is the parameter:
However, when it comes to show the report on Jasper Server's web interface, I can't see a filled input:
Am I missing something?
By the way, I'm using Jasper Studio 6.6.0 and Jasper Server 7.1.0 (compiled version 20180504_1307).
Edit 2018/10/05 13:04
I've changed the input control, so that the id is ic_calificaciones and the name stays as it was (Calificaciones). I've found a way to make it work. First, I deploy the report to my server (local server in my case). Then, I edit the report, go to "Controls and resources", remove the ic_calificaciones parameter and add a InputControl parameter to the report. That way the Calificaciones parameter gets filled up with options.
I found the solution, it was just in front, but due to a poor UI I just didn't realise...
You must edit your parameter's name to match the Input Control's name, in my case it ought to be ic_valoracion. Then, the parameter-to-input-control-binding has to be made when publishing the report to the server.
So, being in Jasper Studio, click on publish button, as seen in the following picture:
Now, select the location where to publish the report. Then, the second step is what we're looking for, it's the place where you must select the resources to publish. As seen in the next image, you must edit your parameter's type to select "Link To Resource", click on whichever place and a new prompt will appear. Now, there, select the desired Input Control.
Finally, test your report.

vscode extension how to display a form

I wish to create a VSCode extension with an entry form on it - some way of input. So far I have only seen document processing or output for an extension.
How can you display a form of input fields in a vscode extension?
How much data do they need to enter? If it's not much, you should be able to handle it with a series of InputBoxes
From https://code.visualstudio.com/docs/extensionAPI/vscode-api
showInputBox(options?: InputBoxOptions): Thenable<string>
Opens an input box to ask the user for input.
The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.
Parameter Description
options?: InputBoxOptions
Configures the behavior of the input box.
Returns Description
Thenable<string>
A promise that resolves to a string the user provided or to undefined in case of dismissal.
The Visual Studio Code API does not have any native methods to display forms to collect input. You can however, chain together Input Boxes, Quick Picks, etc... You can find all these methods under vscode.window.(...).
If these do not satisfy your needs you can implement a webview which allows you to render integrated HTML in Visual Studio Code and trade messages with the extension.
The most simple aproach would be to simple send all collected data from the form to the extension once you hit the submit button or something similar.
You have a nice little tutorial on how to do that here.
Another approach is to see how far you can go with editing JSON objects in settings.json. I thought I would need a form for 8-10 fields, but it turns out that I can create a settings template that has a series of labels and and entry fields (with type validation).

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

ssrs parameters visibility

I m using ssrs on sql 2008.My question maybe utopic.
I want to make this situation,i have two parameters,named xParameters and yParameters.both of them loaded from datasets like combobox.
I want to make like dropdownlist selectedchanged event on c#.If i selected xParameters then hide yParameters.Also this state valid of yParameters.Then execute query on selected query.
Is it possible.
Note:I wrote a query,if bParameters is not null then Xquery,else Yquery,but i want to hide other parameters on forms when a parameters selected.
If I understand your question correctly, you want to know if you can change the visibility of parameters in SSRS.
No, with the built-in SSRS interface you cannot dynamically hide and show parameters.
Potential workarounds:
You can build your own interface and call the web services to pass your parameters in and display the results in your interface.
Can you combine the two parameter lists into one, so that the user is forced by the drop down to select just one item?
Catch invalid entries for the parameters and show an error text box on the report (Big red print) that explains what the user did wrong.

How to change the SSRS input parameters position in report

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/