SSRS insert text when currency value ='GBP' or 'EURO' or 'USD' ect - reporting-services

i have been trying to work out how i can get a ssrs expression to insert text if the following currency appear in my invoices.
I would like,
if currency value = 'GBP' then show text "please pay UK BANK 000x000x00"
if currency value = 'Euro' then show text "please pay Euro BANK 000x000x00"
We have this to make the customer clear on which bank to pay into.

You can use SWITCH (similar to CASE in SQL) to display text based on the your value of the field. I have below an example with the sample you provided. Assuming your column name is "currency".
=SWITCH(
Fields!currency.value = "GBP", "please pay UK BANK 000x000x00",
Fields!currency.value = "Euro", "please pay Euro BANK 000x000x00")

Related

DLookUp not working properly in Microsoft Access

Trying to pull the value in the Query to populate Form Field, not working with what I've tried.
Table 1: Quote Data
Fields: Quote #, Part #, CNC Hours
Table 2: Rate Chart
Fields: Rate Type, Cost ($)
Query 1: Cost of CNC
Fields: Quote #, Part #, CNC Hours, Parts Per Mag, Rate Type (Criteria: "3D Shop"), Cost ($)
Expression: Cost of CNC= [CNC Hours]*[Cost ($)]/[Parts Per Mag]
Main Form: Generate Quotes
SubForm: Quote Data Subform
Field Box: CNC $
Control Source: =DLookUp("[Cost of CNC]", "[Cost of CNC]", "[Part #]=" & [Forms]![Cost of CNC Subform]![Part #])
With the above Control Source I keep getting #Name? in the field text box CNC $.
I've also tried:
=DLookUp("[Cost of CNC]", "[Cost of CNC]", "[Part #] = " & [Part #]) but I get #Error.
What am I doing wrong?
I want the value in Cost of CNC (associated with the proper Part #) to populate Form Field: CNC $.
I got the following to work:
=DLookUp("[Cost of CNC]", "[Cost of CNC]", "[Part #]='"&[Part #]& "'")

SSRS Report Shows #Error When Converting Number to Currency

I am trying to get the report to show the purchase price which the user enters in a parameter. If the user doesn't enter anything it will say "Undisclosed" otherwise I want it to show the purchase price as currency. I have tried the following:
=IIF(Parameters!PurchasePrice.Value = "", "Undisclosed", Cstr(Format(Parameters!PurchasePrice.Value, "C")))
=IIF(Parameters!PurchasePrice.Value = "", "Undisclosed", Format(Parameters!PurchasePrice.Value, "C"))
=IIF(Parameters!PurchasePrice.Value = "", "Undiscloded", FormatCurrency(Parameters!PurchasePrice.Value,0))
=IIF(Parameters!PurchasePrice.Value = "", "Undiscloded", FormatNumber(Parameters!PurchasePrice.Value,0))
I can get "Undisclosed" to appear but every time I enter a number it shows #Error
You can try the following solution:
=IIF(IsNumeric(Parameters!PurchasePrice.Value), Format(Val(Parameters!PurchasePrice.Value), "C"), "Undisclosed")
I would approach this slightly differently. This will avoid SSRS trying to format a non numeric to a currency. IIF will evaluate both the true and false outcomes even though only one result can be true for each instance.
I would set the textbox that shows the purchase price up as follow...
Set the Value expression to be
=VAL(Parameters!PurchasePrice.Value)
This will return a zero if the parameter value is left as blank/empty string
Then set the Format property of the textbox to
$#.00;-$#.00;Undisclosed
Assuming you want $ as the currency symbol. This format string will format the number to two decimals for positive and negative numbers and prefix the $ symbol but for zero values, it will show the work "Undisclosed"

xpath btc history into spreadheet

i'm trying to import the btc price history into a spreadsheet column.
this is the link with the data
https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=10
if i type into one cell:
=IMPORTJSON(https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=10, "prices" )
it gives me a column with a sequence of numbers from 0 to 239.
what is the correct xpath to get the btc prices?
Try using
=ImportJson("https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=10","/prices")

ssrs parameter expression condition

In SSRS (2014) I have created the Placeholder.
The value of Placeholder is picks from SQL 2014 DB StoredProcedure.
In the Placeholder properties, I have below expression,
=Parameters!BRN.Value
When I run the report,
Step 1: Report asks BRN value (which is integer). When I enter value
as "1"
Step 2: Report displays 1
If I pass BRN value as 2
it displays 2
But I want below results,
Step 1: When Report asks BRN value (which is integer). If I enter value
as "1" then it should display as "Winter"
or If I enter value
as "2" then it should display as "Summer"
or If I enter value
as "3" then it should display as "Spring"
or If I enter value
as "4" then it should display as "Sunny"
How can I do this please?
=Switch(Parameters!BRN.Value = 1, "Winter", Parameters!BRN.Value = 2, "Summer", Parameters!BRN.Value = 3, "Spring", Parameters!BRN.Value = 4, "Sunny")

SSRS - Match previous value then display something

Example:
Name: (a field name that display "people name")
His/her information: (match the name then pull out the field value of their "first/last name", "address
, "phone"....etc each represent 1 field value, so it need to pull out 4 field value)
Any advice or what function to use will be appreciate.
thanks for helping!!