How can I add a checkbox in BI Publisher? - bi-publisher

I am trying to add a checkbox in my report. This checkbox should be checked or unchecked depending on database values.
How do I add a checkbox in Oracle BI Publisher?

I'm going out on a limb here and assuming you mean checkbox instead of checkbook
<?if#inlines:YOUR_DATABASE_FIELD = 'Y'?>☑<?end if?>
<?if#inlines:YOUR_DATABASE_FIELD = 'N'?>☐<?end if?>

There is no centrally documented sequence of steps, everyone seems to find different ways to get the checkbox printed. Here is mine, maybe it helps.

Related

Capybara: Finding a second checkbox which is identical to the first

I am writing tests for view files. I have a page with two checkboxes which allows the user to Select All items in two different lists. However, the checkboxes are part of a partial so are identical. I have managed to check the first one using:
first(:checkbox, "Select all").click
But I am unable to check the second. I have tried replacing first with last and with second but to no avail.
I think I may need to use the find selector but am struggling with that also. Any help much appreciated.
Thanks
UPDATE
It appears that this in fact another issue. I think that any checkbox that impacts on other checkboxes does not work as expected when "checked" by Capybara. So the current answers below work in the sense that they do check the checkbox, but the expected behaviour does not occur i.e. the checkboxes linked to them do not get "checked". I may be wrong though.
try this
# find the second checkbox
find('input[type="checkbox"]:nth-child(2)').click
You can use find all
all('input[type="checkbox"]', :text => 'Select all')[1].click
Whoops. Turns out it was a JS issue and not Capybara macthers! Thanks for the help though!

How can I add text to a work item

We have a few bugs and change requests which have a complicated iteration path. This results in people coming over the team to ask 'Where do we raise items' a lot.
As you can't set a default value for the iteration path in TFS 2010 we think the best solution would be to add a string of text under the field which we can manually update every 7 weeks with the correct area to raise items in.
However TFS doesn't seem to allow just a line of text on its work items as a control. Is there a way to add a line of display text i.e. Not a field you edit, but just to inform those writing the items?
Please note that it needs to be visible at all times, using the tooltip 'help text' field on a control is not enough in this case.
You can use the LabelControl for this purpose.
You can not have a default in the work item for the iteration path, but what you can do is making use or the template url in web access or the work item templates in the power tools to create a work item that is prepopulated with values.
What about a custom field with a display control in read-only? You can give a default value to the field and the "read-only" control prevent other to change it.

SmartGWT: Checkbox Tree - the proper way to get selected checkbox value

SmartGWT has this property for a TreeGrid object:
employeeTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
This by default 'prepends' every nodes (including root) with checkbox.
(Just making myself clear.)
Also, I am aware of this similar solved question:
GWT tree with checkbox:How to get all checked tree items?
However, I do not seek this kind of solution..
What I'm looking for is a more efficient way, where I don't have to loop through 1000 items.
Is there any way to do this, if possible, using the widget I am using now?
If not, is there any other way, using other widget?
Thank you very much!
I think as you use SelectionAppearance.CHECKBOX you tell to the grid that the selected records are marked by the checkbox field value. So every time you check one you select a record.
You can get the set of selected records by either getSelection() method or getSelectedRecords(boolean) because of deprecation of the previuous one.
You can have a look at the code of this example of the smartgwt showcase.

New to Visual FoxPro- my textboxes are greyed out and inaccessible

I'm attempting to create a Visual FoxPro standalone application that will take two inputs from a user (old location and new location). It will have two tables with a 1:M relationship with primary and foreign keys matching the old location. The application should then replace all instances in both tables of the old location with the new location.
I've put the form together and got the fields in both tables displaying in grids, both textboxes present and an "Update Records" submit button.
My problem is that my textboxes are greyed out when I select "Form">"Run Form" and I can't input anything.
Does anyone have any ideas why the boxes would be greyed out? I checked in Properties > Data > Read only and they are both marked as .F.
Thanks so much for your help!
*edit: Figured it out- Had ControlSource on because I thought that would bind the input to a specific field in a specific table. Never mind! :)
Figured it out- Had ControlSource on because I thought that would bind the input to a specific field in a specific table. Never mind! :)
Kate
Just as an aside. the text boxes can be greyed out for a number of reasons, the most obvious ones are property set to readonly = .t. or enabled = .f., but also if the text box is bound to a datasource and that source is not available.
i.e the table EMPTY or is EOF() or BOF()

auto_complete_for: prevent the first item from being auto-selected

The auto_complete_for dealio from script.aculo.us is great an all, but is there a way for me to selectively disable the fact that it always auto-selects the first item in the list?
The problem is that, if I want to type my own entry that is new, and novel, I don't want the first item in the list to be auto-selected. The reason is because when I TAB out of the field, it selects, and fills the text box with that first item.
I got around that, somewhat, by making the first item in the list the same as what I'm typing, but that's not perfect either, because the auto_complete list doesn't always update with every keystroke, depending on how fast I type. I've tried setting the list refresh rate to the lowest value (1 millisecond) but no go.
What I really want is an option in "auto_complete_for" that doesn't select that first item at all - the same way that Google Instant doesn't automatically select the first suggested search phrase - you have to arrow-down to select one.
Maybe I can do this via an HTML option that I'm missing?
Looking at the source, there doesn't appear to be an option for that, but I bet if you changed line 284 of controls.js to this.index = -1; it would do what you want.
Otherwise, it might be time to look for a different autocomplete widget.
If your requirements are too far away from the available plugin, then I guess there is no point in tinkering around. Its best to write your own JS code.
You might want to consider this: https://github.com/laktek/jQuery-Smart-Auto-Complete
or this : https://github.com/reinh/jquery-autocomplete
I'll add another alternative that works great with Rails 3:
http://github.com/crowdint/rails3-jquery-autocomplete
I recently implemented auto complete for more than a field for Rails 2.0.2.
The plugin I used is:- https://github.com/david-kerins/auto_complete . Not sure if it supports Rails 3.
I have also encountered issues on implementing the above scenario and have posted questions( Implementing auto complete for more than one field in Rails ; Implementing a OnClick kind of functionality and formatting wrt Rails Partial-Views ) on stackoverflow for the same, I have been lucky on getting things working for me based on my requirement.
Kindly refer to these questions, they might have relevance to your requirement.

Resources