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.
Related
I have SSRS report which has field with an empty values, based on yes/no parameter
When my parameter = No, this field appears as empty (no values)
When my parameter = Yes, this field has values
Please, see the images below -
"include Depreciation" Parameter = No,
"Depreciation" field is empty:
[![enter image description here][1]][1]
"include Depreciation" Parameter = Yes,
"Depreciation" field is NOT empty
My goal is to hide the row when the parameter = No (and field has no values)
I was trying the following in SSRS:
In "Design" view in the table, clicked on an entire row responsible for "Depreciation", Row Visibility, Visibility - "Show / Hide based on an expression", entered the following expression:
=IIF(Isnothing(Fields!GLGroupLevel2Name.Value),false,true)
But it does nothing... An empty row (in case if parameter = No) still appears.
Here is my "Design" view
(the row I modified with the conditional show/hide - is marked in grey):
Any suggestions or advice would be very helpful!
Thank you...
Try expression on Group Visibility.
If your condition is fixed then Go to Row Group Properties and Apply your same expression in Visibility option based on your condition.
Use Expression as:
=iif((Fields!YourFieldName.Value <> "") ,false,true)
As shown in below image
This should work.
I have a report which uses an expression to provide data for each particular page. I have been able to get the report to display the correct data, however the column that the expression is in, is not necessary and the rest of the table will not fit on the page. I need to get rid of the column but reference the expression somewhere else on the report. I have tried a few things, such as referencing the text box but get Scope errors.
I would like the expression to display where the green line is, and make the first column invisible.
Any ideas how I can reference the value of this textbox in the desired location?
Current state of report:
expression ="Load Number: " & Fields!TPLD_SYS_NO.Value & " | " & "Vehicle:" & Fields!TPLD_TPVH_REG.Value & " | " & Fields!TPLD_REF.Value
expression used to reference 1st expression =ReportItems!TPLD_SYS_NO1.Value
error The value expression for the textbox 'textbox8' refers to the report item 'TPLD_SYS_NO1'. Report item expressions can only refer to other report items in the same grouping scope or a containing grouping scope
This is from memory, zero testing I'm afraid so it might not be quite right but it should be close enough to follow.
A couple of options.
If the report will only ever show one value for this expression then you should be able to just use your original value expression directly in the 'new' text box but where you have Fields!myField.value, replace these with FIRST(Fields!myField.Value, "myDataset") where myDataset refers to the name of your dataset (you must include the quotes).
If the report is grouped so this expression will evaluate to two or more different values then you need to add a row inside the lowest group that will have all the required fields in either itself or child groups. As I guess I would say that would be the same level as your Total textbox. So Insert Row / Inside Group Above and then use the expression above but without the dataset name. You should be able to not specify this or if you get problems, specify it as the name of the rowgroup that your new textbox sits in.
To get an out of scope value, you can create custom code functions to store the value and assign the text as follows :
="Load Details" + Code.Save_TPLD_SYS_NO(Fields!TPLD_SYS_NO.Value)
When you need to recall the value at some other point you can reference a function that returns the saved value like:
=Code.GetSaved_TPLD_SYS_NO(true)
In your custom code you can create a variable that will hold the value and that the function would be something like:
NOTE : This is untested and the code comes from memory, you may have to fiddle a bit to get the correct syntax.
Public Dim Shared TPLD_SYS_NO As String ="";
function Save_TPLD_SYS_NO(value As String) As String
Begin
TPLD_SYS_NO = value
Return ""
End Function
function DisplayAndSave_TPLD_SYS_NO(value As String) As String
Begin
TPLD_SYS_NO = value
Return value
End Function
function GetSaved_TPLD_SYS_NO(resetValue as Boolean) As String
Begin
Dim result As String = TPLD_SYS_NO
If resetValue=true Then
TPLD_SYS_NO = ""
End If
Return result
End Function
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
I have dialog with set of xtypes defined.
One of xtype is "selection" with type "select".
Now each option has a value type "String[]" , but when I add the component to a page and look at the option selected content.
It is stored as "String" rather than "String[]".
Could anyone tell me how to make/force a xtype store its values in a "String[]" , rather than "String".
You can use one of the Sling parameters to manipulate the content creation through the SlingPostServlet. Read more: here
In reality, just add a hidden field to your dialog that will pass the #TypeHint parameter with the expected property type. If your xtype saves data to e.g. cities property you can add the following:
<citiesTypeHint
jcr:primaryType="cq:Widget"
name="cities#TypeHint"
value="String[]"
xtype="hidden"
When you are adding xtype in dialog.xml, add it as :
property=value
This will create a property of String type with value as value.
If you want an array put the value in [], as :
property="[value1,value2,value3,...]"
This will create a property of String[] type with value as value. If you want to add more, separate then with coma.
If you want to define dataType, as :
property="{dataType}value"
This will create a property of dataType type with value as value. Where dataType may be any DataType like Boolean, Date, Long, etc
If you are adding Property with crx/de then click on add multi button in the bottom right corner.
Hope this Helps...:)
Mateusz ChromiĆski variant almost worked for me, except that value="String[]" results in emprty property, so I have used defaultValue="String[]" and it worked just perfect.
<targetGroupsTypeHint
jcr:primaryType="cq:Widget"
name="./targetGroups#TypeHint"
defaultValue="String[]"
xtype="hidden"/>
Enter the following in the dialog:
typeHint="String[]"
I'm trying to use FlxUICheckBox. In the official documentation, the constructor looks like this:
new(X:Float = 0, Y:Float = 0, ?Box:Dynamic, ..)
What is the Box object?
How should I send a Box object as a parameter to this constructor?
I should probably change it to BoxAsset. It's the image asset you want to use for the box part of the checkbox.
A simple checkbox has three components, and looks a bit like this:
[X] Checkbox
Box means the box part, "[ ]"
Check means the check part, "X"
Label means the text that goes in the textfield next to the checkbox
If you don't provide Box or Check, it will use default FlxUIAssets automatically to skin your checkbox. If you provide your own asset (such as "assets/mybox.png" for example), it will use that instead. It is expecting the same sort of thing you would pass into FlxSprite.loadGraphic() -- a String, a BitmapData, or a FlxGraphic.
I should probably also update the type from :Dynamic to :FlxGraphicAsset, I originally wrote this code a long time ago before they added that new helper type.