Nesting Expressions - vb.net

I have and expression:
=UCASE(Fields!MotherFullName.Value)​
and an expression:
=IIF(ISNOTHING(Fields!MotherFullName.Value) ,"-",Fields!MotherFullName.Value)
I want to nest them into one expression since they are operating on the same value, what must I do?

Using your code and taking a pass on evaluating the syntax...
=IIF(ISNOTHING(Fields!MotherFullName.Value) ,"-",UCASE(Fields!MotherFullName.Value)​)

What have you tried?
=IIF(ISNOTHING(UCASE(Fields!MotherFullName.Value)​) ,"-",UCASE(Fields!MotherFullName.Value))
should work, but I'd Advise you to Create Additional fields in your report and they use them to arrive at what you need, since the fields you dont include will not be displayed.
Also, Make sure you are making your edits in the expression window, not directly on your reports.

I finished creating the report above and it is working well, but when I upload it into the CRM Dynamics online, it is greyed out as shown in the picture bellow: What must I do?

Related

Rdlc report expression not formatted correctly. What am i doing wrong?

What is wrong with this tablix group expression?
=First(Fields!ROWNO.Value, "QuestionPaperData")
During edit, I am not allowed to share image. I could not read the full message. I am still struggling for exact design.
Try to make the expression like this =Fields!ROWNO.Value

grafana multi value query in timestream

i have some problems displaying my aws timestream data in grafana. I added as a global dashboard variable DevEUI with 3 different specific values. But when i am using the multivalue syntax ${DevEUI} in my query with more then one value i get everytime a error.
hope somebody can give me a hint.
Regards and thanks in advance
You are most probably having a list of values as the value of your multivalue Grafana variable, but you are still using the = operator in your query. Try ... and DevEUI IN ('${DevEUI}'). Or maybe without the single quotes or the parantheses... the exact syntax depends on your Grafana variable.
But, this is just an educated guess, since I cannot see neither your database schema nor the definition of this Grafana variable (both of which are important details in a question like yours, for future reference).
This is how I did it for a multivalued string value:
timestream_variable_name = ANY(VALUES ${grafana_variable_name:singlequote})
You might have to adjust the formatting Grafana applies to the concatenated variable value it generates, depending on your data type.
I know this is long after the original question but #alparius pointed me in the right direction so I wanted to update the fix for the problem Joe reported.
Use formatting to get the proper quotes/values when formatting your query. Something like this:
Select * from database where searchiterm IN (${Multi-Value_Variable:sqlstring})

YEARFRAC function on SQL Server not working

I was happy to find you can use an Excel-like YEARFRAC function in MS SQL server (http://technet.microsoft.com/en-us/library/ee634405.aspx), but for some reason I get an error that states:
'yearfrac' is not a recognized built-in function name
when I try to run my query. Here is my code:
SELECT CUSTOMER_ID, PRODUCT_SKU, SUB_START_DATE, SUB_EXP_DATE,
YEARFRAC(sub_start_date, sub_exp_date) AS START_TO_END FROM ...
For the record, I have double-checked the dates are in proper datetime format, and I tried both using no basis (as shown above), and using the available 1-4 bases. I also tried removing the column alias (START_TO_END). None of these worked. Any ideas?
No, that is in Analysis Services (DAX specifically), not in T-SQL. The header on the page does not make it clear which section of the documentation you're in, but look at the table of contents on the left...
Sorry the screen shot is double size, it's because of my Retina screen giving 144dpi instead of 72dpi.
Anyway, you should be able to replicate this functionality with your own UDF or, if you always calculate a specific way, it might even be simple enough to do inline. A calendar table may help.

how to update field names automatically after updating SQL

I am changing the command text for a data set inside the .rdl ffile:
I would like to know how can I update the resulting fields that are returned by the select statement:
I know that these fields must be automatically generated, so I was wondering if it's possible to update them right after editing the SQL code inline??
Usually when someone wants to have a look at the data in command text they are wanting it for reference to an end user(from what I have seen). You may want to amend it but ultimately with reporting your first goal should be: "What am I doing this for?" If your goal is dynamic creation at runtime then I would avoid this and offer a few other suggestions:
Procertize it. Making a stored procedure if you have the know how in SQL Server is a convenient and fast way to get what you want and you can optimize it if you know what you are doing with your SQL FU to get good results. The downside would be if you work with multiple environments you have to deploy your code for the TSQL as well as the RDL file.
Use an expression to build the dataset at runtime. In cases where I have been told that the query itself was not properly optimized by other developers they have mentioned doing this. I myself do not always see the advantage of doing this versus just having your predicate construction work well with good indexing on the source engine. Regardless you can build your dataset at runtime. It would be similar to hitting 'fx' next to the text and then putting in something like this(assuming you have a variable named #Start):
="Select thing
from table
Where >= " & Parameters!Start.Value
Again I have not really seen if this is really that much faster than:
Select thing
from table
Where >= #Start
But it is there if you just want to build it dynamically.
You can try to build your expression dynamically from parameters being PART of the select statement. SSRS is all about the 'expressions' and what you can do with them. Once you jump in and learn how they apply to everything you can go nuts so to speak on using them. A general rule though is the more of them you use and rely on the slower your reports will become.
I hope some of this may help, I would ask first is something dynamic due to a need to be event driven or is performance related.

query not pulling in select box value, oracle

I am using application builder and setting up select boxes to populate a query that spits out into a report below, I'm having a problem with one populating though, and I can't immediatly see why;
Here's how I'm referencing;
AND CINEMA.LOCATION = :pticketstown
this works fine and pulls in the choice from the select box which is popluated from a query on the cinema table, however when I try and do the same thing for another table, try and pull in a film title from a select box choice - it doesnt seem to work, the rport says no output.
Im setting up the select box the same way, and its pulling in the films, but when as soon as I reference it in the sql report, the ouptut is empty.
FILM.FILM_TITLE = :pfilm
Has nayone any thoughts on why it would fail on something that uses the same method ? is it a case that the value isn't bieng passed across? I'm a little stumped if that's the case as I set it up the same way as the working one.
Thanks for looking
I assume from the sound of it you are using application express? Have you turned on debugging to see exactly what is being passed? It might be encoding the spaces or something.
It seems strange that the two, seemingly similar queries would behave differently. Do you have access to the actual sql produced? If so, i would try running that against your db direct through the command line or sql developer if you have it.