Parameter Field issue - crystal-reports

I am having a problem with one of my parameter fields. I have YES to show all the results with yes on, and NO for all of those with no on, on other parameter fields if i leave the field as "..." it will show both yes and no. I don't seem to be able to select "..." as a default value. When i click "..." in the parameter field no results are shown.
please see the below screenshots relevant to this column:
Image 1
Image 2
Image 3
Image 4
If you require any more information, please ask.
thank you,

'...' isn't a value that can be set. It is what is displayed when a value hasn't been chosen.
You can either:
make it an optional parameter; see Conditionally prompting for optional parameters
make it a multi-select parameter and look for the presence of one or the other or both
In both cases, it would be easier for you if you used a Boolean parameter rather than a String.

Related

Vue Element UI - Default el-input-number to empty field instead of a number

Creating a form with no values and would like the input field to default to empty for two reasons:
Want users to be able to see the placeholder text.
Having a default number means the users can ignore the field by default. (I know I can validate the field, but that is just a bad user experience.)
The problem:
el-input-number fields default to a number (0 or whatever the :min value is set to).
This covers up the placeholder text.
The users can click save with the default number still in place. (I will validate, but don't want users to have to submit a bad value to know what to do.)
Does anyone know how to make the input field have the default value be just empty?
just give it a default value of undefined
https://codepen.io/rugia/pen/bGEoWaB?editors=1010

Passing parameters to VFP 9 form

I have a form in VFP 9 that is usually called from another form with 2 parameters.
I've got a strange thing happening: when I execute DO FORM jobless_add in command window, the first parameter is always set to "2", while no parameters were added.
As a result, I have EMPTY(par1) == false and EMPTY(par2) == true. After that I've tried to open the form in the normal way (from the other form's button click with 2 parameters) and I've gotten this result in debugger
This is my first visit, so I cant insert images. Link: image
(hint: Locals: all ok, Watches: "2" again)
NOTE: I have no global variables yet.
You most likely have a table with a field/column called 'jobless_id'.
To clarify further, a table's field takes precedence over a memory variable if you reference just the unqualified field name. Try "m.jobless_id" to explicitly reference the variable (i.e., the parameter).

jQuery: Select all 'select' elements with certain val()

Does anyone know of an easy way, using jQuery, to select all <select> elements whose val() attribute yields a certain value?
I'm trying to do some validation logic and would like to just select all those elements with a single selector, then apply a warning class to each of their parents. This I know how to do once I select all the elements, but I didn't see a selector that handles this case.
Am I going to have to select all of the <select> elements into a selector, then iterate through them and check each of their values? I was hoping there would be a simpler way.
Thanks.
Why doesn't select[value=x] work? Well firstly because <select> doesn't actually have a value attribute. There is not a single value of a select box: there may be no selected options (there shouldn't normally be, but there can be in at least IE), and, in a <select multiple>, there can be any number of selected options.
Even input[value=x] doesn't work, even though <input> does have a value attribute. Well, it does work, it just doesn't do what you think. It fetches the value of the value="..." attribute in the HTML, not the current value you have entered into the form. The value="..." attribute actually corresponds to the defaultValue property and not value.
Similarly, option[value=x][selected] doesn't work because it is checking the <option selected> attribute from the HTML source (selected attribute -> defaultSelected property) and not the current selectedness of the option (selected property not attribute) - which might have changed since the page was loaded.
Except in IE, which gets the value, selected etc form attributes wrong.
Except (again): Tesserex's example may seem to work, and the reason for that is that that it's using a non-standard jQuery-specific selector, :has. This causes the native querySelectorAll methods of modern browsers to fail, and consequently jQuery falls back to its own (native JavaScript, slow) selector engine instead. This selector engine has a bug where it confuses properties for attributes, allowing [value=x] to do what you expected, and not fail like it should! (Update: this is probably no longer the case in newer jQuery versions.)
Summary: form field state checking and selectors don't mix. Apart from these issues, you also have to worry about escaping issues - for example, what if the value you want to test against contains quotes or square brackets?
So instead, yes, you should check it manually. For example using a filter:
$('select').filter(function() {
return $(this).val()==='the target value';
}).parent().addClass('warning');
(There is a value property in HTML5 and supported by modern browsers, that when you read it gives you the value of the first selected <option>. jQuery's val() is safe to use here because it provides the same method of getting the first selected option even on browsers that don't support this.)
The existing answers don't work on select tags, but I found something that does. Ask for a select that has a selected option.
$("select:has(option[value=blah]:selected)")
You can use :
$("select[value=X]");
where X is the value against which you want to check the select's value.
Attribute selectors Is what you're looking for I believe.
Something like $+('element[attribute="value"]')
See also:
*= anywhere
^= starts with
$= ends with
~= contains word
etc.
You can create a change event that puts the value in a custom attribute on the select element whenever the value changes. You can then use a simple selector to find all of the select elements that have that value. For example:
$("select").on("change", function (e) {
var $select = $(e.currentTarget);
$select.attr("select-value", $select.val());
});
And then you can do this:
var $matches = $("select[select-value='" + searchVal + "']");
$matches will have all of your matching selects.
This is a lot easier than having to iterate through elements. Remember to set select-value to the initial value when rendering the page so you don't need to trigger a change event for each select so the select-value is set.

SSRS date default with formula disables parameter

When I set a default value formula for a date parameter in SSRS, such as:
=CDate(”01/” & Month(Now) & “/” & Year(Now))
or even:
=Now
the date parameter control becomes disabled with nothing in it. Does anyone know what simple thing (I am sure) I am doing wrong?
After playing some more, I realized that the date controls became enabled when I picked a value from a preceding dropdown parameter that did not have a default. Apparently, controls after non-default parameters are disabled until you pick something, so order matters.
From an MDSN article:
"parameter order is important when you want to show users the default value for one parameter before they choose values for other parameters"
http://msdn.microsoft.com/en-us/library/cc281392.aspx
I experienced the same and the problems lies on the USER ID parameter that I set to internal visibility but without any default value. When I put in default value or set this to null, the date parameter was enabled.. (User ID parameter comes before the date parameter on my case)
Now is a function and you must use like =Now()
maybe it is your problem.

JasperReports: default value instead of 'null'

Is there any way to set a default value to a field in a report? I have a lot of String fields in a report and would like them to display "0,00" when they're null.
Supposing the field name is "value", in the "Text Field Expression", write:
($F{value} != null) ? $F{value} : "0.00"
You can also select "Blank when null" in the properties of the text field if you want that. Other options are more flexible but this does the trick very quick and easy.
medopal's answer is good, but 2 additions:
1) You can make the syntax shorter:
($F{field_name}) ? $F{field_name} : "0.00"
2) Make sure your "else" data is of the same class as the field's value, otherwise you'll get errors when it tries to coerce numbers into string, etc. etc. This was something that, as I started out, I mixed up.
Did you try set a pattern in the text field?
If you are using iReport this can be found in the properties for the text field in the Text Field Properties section.
Try something along the lines of ###0.00 to represent 1234.56, which would always display 0.00 even if it is null.
This is the easiest way is to use Coalesce() or NVL() function of database in your data-source query to restrict null data on your report.
But it depends on if you are allowed to change the datasource query or not. If not then you can go for other solutions provided in previous answers.