How to change default value [null] input control in jasperserver - jasper-reports

I made a report with jaspersoft and declare parameter and input control to filter my report in jasperserver.
In result...default value in input control is [null] like below screenshot
jasperserver result screenshot
my question is how can I change or delete this default value in jasperserver

Related

Loading values in ireport parameters box

In ireport when clicking on preview, and you have parameters, you'll get a parameter box where you put a certain value to get specific record(s).Now i am trying to put specific values in the parameter box, so that the user would choose between it.
The same goal as in this so question : Loading promt box with parameters in iReport
However i want to do it without using Jasper Server. Is it possible to achieve this only from within IReport Designer?
You can do this,right click on the input control and select to add the local input control and provide id and name for the input control
Under the input control details select single select list of values if you have the list of values with you or if you want to add the data of a column as drill down select single select select query and extract that field.
This will help you to drill down the data.
Thanks and Regards
Megha
I'm pretty sure you can not do this in iReport preview. Have no clue what #Megha is refereeing to....
You can provide default value for your parameter through the <defaultValueExpression> tag and decide if you wan't it to prompt or not to prompt with the isForPrompting attribute.
Why can't we have select list, well I guess iReport is a tool for developers, so the preview is only to test the report. For customers jasper soft have developed the jasper report server.
And remember you can always develop your own interface (in swing or on the web)

JasperReports parameters works in iReport but fails on JasperReports Server (II)

I have a very similar problem to the one described at [JasperReport parameters works in iReport but fails on JasperServer] post.
The report works properly within the iReport environment using Preview option but fails within JasperReports Server
The comments suggest that iReport does not create the InputControl within JR Server. So I verified that the server contained the proper InputControl (that apparently solved their issue).
The input control called sk serial selection :
ID: ic_sk_serial
Name: sk serial selection
Type: Single Select Query
Mandatory: false
Read Only: false
Visible: true
Query resource:
From repository (pointing to *q_sk_serial* see below)
Value and Visible columns:
Value column: id
Visible query columns: serialnr
The input control query called q_sk_serial (populate the inpute control with a list of alphanumeric serial numbers, items are unique):
select id,serialnr from "public"."serials" order by serialnr;
The parameter name:
ic_sk_serial
The report query:
select * from "public"."datas" datas where datas."serialnr" like $P{ic_sk_serial}
In my case, input control seems to work properly in both environments (within iReport preview and JasperServer): I populate a list of items coming from the same database; I see that dropdownlist as expected within iReport but also on with JR Server.
Within iReport, the drop-down list returns the correct selected value in a report parameter which lead to the correct report. In JasperReports Server I only get a "The report is empty" message. So I tend to think the report parameter is not properly passed through within JasperServer.
Hardcoding the "Input control" output value, shows expected report.
Side note: I am using iReport 4.7.1 in compatibility mode with JasperReports Server 4.5.0.
I would be glad to hear if anybody ran into the same problem?
How can I debug further the report execution in JR Server?
Is compatibility mode susceptible to cause that issue?
What about the input parameter type? I use a query that return a string. However my input data type is text (closest match to string). My parameter type is java.lang.string. Does this make sense?
Actually that is a simple bug:
I just found out that:
value column: id
Should be
value column: serialnr
Still, I do not understand why the report was working in preview mode? Such big mistake should fail on preview no?
In anycase thanks to everybody to lead to my mistake ;)
In my point of view, there are two types of parameter within a jasper report including: Report parameter and Dataset Paramter.
Firstly, you must create both parameters and then map the one of Dataset to the one of Report.
I encountered the same problem to you thus that resolved my case.

Date format on input control

I'm using iReport 4.6.0 and JasperReports Server 4.5.0. I've created a report where I want to pass a date value to a MySQL database. I've created a parameter and used java.util.Date class. On the input control, I set it to a single value type, and the date data type. When running the report in iReport (using Preview), I'm prompted to select a date, and it generates the report using the specified date. After deploying the report to the JasperReports Server, when I'm prompted to enter a date, I get an empty report. I noticed the date format is different on the input control on the server (YYYY-MM-DD) than the one when previewing the report in iReport (MM/DD/YYYY). Is there any way to fix this?
I agree with mdahlman. The formatting of the input control shouldn't be a problem. It should be passing a valid date value to the report.
Make sure that the name of the input control (not the label) exactly matches the name of your parameter. And it is case sensitive. If they are not identical, this could be your problem.

Crystal report parametr field validation

Im using crystal report in asp.net....I have create parameter fields to get input....Consider if i create numeric parametere field then i have to validate that particular field if user enter other than numbers how?
You can validate parameter value before pass it to report and if its value was not valid show a message and don't preview report.

Crystal Reports: How do I allow "set to null" when prompting for values to pass to subreports?

I have created a report which links into subreports. I created parameter fields to feed into the parameters of the subreports using subreport links.
If I do not add a subreport link and therefore the subreport is prompting for the value directly it will allow the set to null option. However, if the enter value prompt is being generated from the parameter field I inserted then the set to null option is not displayed.
I have 12 subreports so I can't prompt for the same values 12 times.
I am using Crystal Reports XI designer and not .net
set up formulas with nothing in them (null values) to pass to the subreports
In XI, I've only seen the 'Set to Null' option when the report uses a stored procedure as its data source. Is this the case for your subreport?
Usually, subreports are linked to fields in the main report so that the user isn't prompted repeatedly (once for each time the section that contains the subreport is rendered). If they are linked, the only prompting that will be encountered it that of main report.
Crystal Reports XI parameter fields (created in the UI, not the result of a SP) do not have a 'Set to Null' option. As a result, each parameter will need to have some value.
You may want to have a look at my Crystal Reports: Optional-Multi-Select Parameters posting on how you can add some optional values to your parameters.