Visibility IIF statement rdlcreports - winforms

I have a report with a textfield "copy" in it. This should be hidden when my dataset field "isPrinted" is false.
So i tried this one under the expression of the hidden option of the textfield property:
=IIf(First(Fields!isPrinted.Value , "DataSet1")=false)
Obviously im doing something wrong, but I have no idea what.
Anyone who would be so kind to help me in the right direction here ?

Hidden is expecting a result to return TRUE if you want it hidden. The IIF() is typically
IIF( some condition, return this if true, return this if false ).
So, if you want the label HIDDEN, you probably want to remove the IIF(). If the "isPrinted.Value" is a boolean, you MIGHT just be able to do based on something like
=First(Fields!isPrinted.Value, "DataSet1")
or (! logical NOT) if the reverse
=!First(Fields!isPrinted.Value, "DataSet1")

Related

iif statement do nothing

I am trying to return nothing for a false statement. Is there a way to do this?
iif(a=1, "Yes", null) <--- this obviously didn't work, but is there anything else that returns nothing if it evaluates a statement as false?
If this is in an SSRS expression then you can use the following
=IIF(Fields!myField.Value = 1, "Yes", nothing)
nothing in SSRS expressions is similar to NULL
For example you can set a textbox background color to nothing which is the same as selecting 'no color' on the property drop down.

Apply conditional formatting depending on an other field's value

On the field DaysSinceRequest of an an Access' Form, I am applying a conditional formatting depending on its value in eavch record, that part is fine.
But how could I tell "Apply the conditional formatting to the field DaysSinceRequest ONLY if the field DatePartReceived is empty/null" ?
Is there a way to do this ?
PS : Just to show that I've done something before haters start down rating, here are the rules I've applied to the field DaysSinceRequest and the result in the Datasheet View
Tell if if my post is not clear enough, thanks
Just use Expression Is instead of Field Value Is and in Expression field you can use any expression, which evaluates to Boolean value. In your case you can use IsNull function

Xpages Combobox -setting the default value

I have a combobox with values being populated from a managed bean like so:
keywordlist.setConnDB("jdbc:sqlserver://xx.xx.x.xx:1433;DatabaseName=xxx");
keywordlist.setConnUserName("xxx");
keywordlist.setConnPassword("xxx");
keywordlist.setSQLQuery("SELECT DisplayText as Keyword From Glossary WHERE SUBSTRING(DisplayText, 1, 2)= 'RV'");
keywordlist.keywords;
I'd like to be able to set the default to '--- Select ---', but no matter what I do the keyword list always picks the first of the returned keywords as the default.
Any assistance would be much appreciated.
Thanks,
Dan
Add another value pair (on first position), type "formula item" with the following SSJS return value:
"-- Select --|"
Notice the pipe!
That should display this at first position and should also be defaulted as "empty" is the default value. If not, set the "alias" (the value after the pipe) to something that you can define as default value porperty for the combo item.
It might be because you're binding to the bean directly. You might have to add that value to your keyword list itself. I think I have an example of this in a NotesIn9 show: http://notesin9.com/index.php/2014/03/13/notesin9-138-xpages-combobox-improvements/
I'm not sure. If I don't have a default in the java code you can probably see how it might be done.
Try that. If that doesn't work at all then maybe you don't bind the combo box to the bean directly. Maybe bind it to a viewScope var... since that can be anything it'll take a blank... then you just need to move the viewScope var value back up to your bean in the onChange event or something.
Just a quick thought...
Basically, the following pattern could be a start point for such a combobox:
<xp:comboBox
id="comboBox1"
defaultValue=""
value="#{document1.someField}">
<xp:selectItem
itemLabel="--- Select ---"
itemValue=""></xp:selectItem>
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:
// Your SSJS code...
// Should return some kind of list...
return items;
}]]></xp:this.value>
</xp:selectItems>
</xp:comboBox>
Alternatively, you can grab the keyword values from a Java bean:
<xp:selectItems value=#{yourBean.yourValue}></xp:selectItems>
Still, it's important to return a list value. It might also have "label|value" format.

How does tabIndex work for ExtJS fields (confirmation)?

I've been puzzling over the tabIndex config for ExtJS's Ext.form.field.Base (generic field, in other words). I didn't find much information in the documentation (but then maybe I looked in the wrong place), so I went with trial and error and here's how I understand it now.
Fields where tabIndex is set explicitly with an integer value strictly greater than 0 are ordered by ascending tabIndex. If several fields have been set with the same tabIndex value, they are sub-ordered by creation: the first field created goes first and so on.
Fields where tabIndex is set explicitly with 0, or where tabIndex is not set explicitly, go next, with the same sub-order by creation.
Fields where tabIndex is set exlicitly with an integer value strictly lesser than 0 are out of the order: you cannot reach them with Tab.
(I'll admit that I didn't try to set tabIndex with non-integer values.)
Can someone confirm that this is the way it works, or better yet, point out mistakes or omissions in the above, please ?
The nice folks at sencha have confirmed it : http://www.sencha.com/forum/showthread.php?250586-Can-someone-please-confirm-tabIndex-behavior-with-Ext.form.field.Base&p=918558#post918558
They also pointed out that it was the same in HTML, which is quite right but I had had no inkling of it. Silly me. Well, I hope someone else will find this useful.

SSRS BIDS expression Show/Hide image based on passed through parameter

Is it possible to have an image available if a certain field is selected, in this case the parameter is #employeename, I only want the image that has been placed on the report to display if a certain value is true.
What is the syntax, field i am concerned with is employeename
The expression would be something like:
=IIf(Fields!employeename.Value = "Something", True, False)
You can have "Something" be a hard-coded value or another parameter. The key thing to remember is you have to access the .Value property.

Resources