SQL Server - Image Expression - reporting-services

Using SSRS.
I have created a car park map with set locations, each car park will have a different vehicle parked in said location. I want to create an expression to add to the image for each park to identify what is parked there and based on the column data display a different image.
For example:
=CASE
WHEN ParkingSpot = x AND NumberPlate = Y THEN "IMAGE OF THAT CAR.JPG"
I've tried a few different variations of the above but I've had no luck. If there is a better way of doing this be querying for the car's current location and creating a variable etc please let me know.
I've tried a switch but I need more information.
=CASE
WHEN ParkingSpot = x AND NumberPlate = Y THEN "IMAGE OF THAT CAR.JPG"
So in short what I'm trying to achieve is for each parking bay to show a picture of which car is there depending on the location/plate values.
If ParkingSpot = 4A AND NumberPlate = XXX-XXX THEN "Display Car Image"

Figured it out:
=Switch(Fields!ParkingSpot.Value="4A" AND Fields!NumberPlate="ABC-DEF", "image.jpg" )

Related

Query Gaia by star name

I am attempting to query Gaia programmatically in python to get the parallax, distance and kmag of specific stars. I can write a query which obtains the parallax, but only for all stars, not a set of stars or one specific star. Ideally I would just be able to pass the query function a star name but I can't figure out from the documentation how to do this (or even how to make the star name, rather than just the Gaia source_id, a column in the returned table).
My current script is as follows:
query = """SELECT source_id, ra, dec, parallax FROM gaiadr2.gaia_source """
job = Gaia.launch_job(query)
results = job.get_results()
Any pointers are much appreciated!
so what you want is a cone search, so I would go into Stellarium and get the RA and dec coords, then convert it using this website: https://www.swift.psu.edu/secure/toop/convert.htm, input the data, and the last digit is your FOV. (in Stellarium) then submit SQL query BUT go back and edit it, so from here you can add all your code like so:
SELECT parallax, distance, kmag, ra
FROM gaiadr2.gaia_source
WHERE 1 = CONTAINS(POINT('ICRS', ra, dec),
CIRCLE('ICRS', 274.2667(RA), -18.5975(DEC), 1.87(FOV)))
enter image description here

Unable to find maps in tableau

Unable to find map in Sheet after dragging Country / Region into Sheet. there would be some online offline map options which should be explained.
First, make sure that Tableau is recognizing your country field as a country. Click the dropdown on your field to see this:
You should then see the lon/lat(generated) in the col/row as in my image.
If this doesn't work, check the lower right of your sheet for this:
If you see this, Tableau isn't able to match your country names to their recognized names. Click the unknown label and you will be able to define the matches.
You can define the match by searching by country that Tableau recognizes or define it with lat/lon in this screen.

Amazon API SalesRank not displaying results and ASIN's incorrect

I'm trying to implement a feature that will show me the sales rank of items by a certain brand name, however I cannot get the sale rank to show in my results and the ASIN or URL's dont match for some reason.
For example, my parameters are:
Search Index: Fashion
ResponseGroup: Images,ItemAttributes,SalesRank
Brand: 'Ziccousi Designs'
Now, first things first:
My first result is for "Kids Namaste Nah Mas Tay Yoga Om Meditation Tshirt 8 Brown", ASIN B01F7DKCZW
The Page URL I am given for this is:
https://www.amazon.com/Kids-Namaste-Meditation-Tshirt-Brown/dp/B01F7DKCZW
Now, take a look at the ASIN on that page, it's down as:
ASIN: B01F7DKNYM
Therefore, neither the ASIN or the SalesRank is correct. This is the same for every single one of my results
It seems the URL changes depending on the fit and colour you pick, but the variant returned by the API affects the ASIN and fails to show the Sales Rank.
Can anyone give me a pointer as to why my results aren't right?

using switch to check market and prefix with correct currency symbol

Hey I have a report where I have order value in one of the columns. I also have a market parameter which has UK and US. What I want to be able to do is to use switch to check which market code is passed and give the respected currency symbol prefixed.
E.g. See image below
I am clueless how to do this based on what is passed onto the parameter.
A couple of suggestions.
If you only have the 2 markets:
=Format(Fields!Money.Value, IIf(Parameters!Market.Value = "US", "$#.##", "£#.##"))
If you will have more markets in the future, you want to use switch so you can add more easily.
=Format(Fields!Money.Value, Switch(Parameters!Market.Value = "US","$#.##",Parameters!Market.Value = "UK","£#.##", etc...)
Remove the .## if you do not want the values after the decimal.

Allow users to add markers based on name of places instead of coordinates and then allow then to filter

I have a group of 10 volunteers who will distribute flyers in different areas. I want to make a web page where they can login and then add their markers by searching for the place instead of coordinates (if believe its done through Geocoding??). Then once the user is logged in I want them to filter the markers by "My markers" and "All markers" category.
So 2 things. How to make the user search using name instead of coordinates and add the marker. And second, how to filter the markers.
Thanks
Karan
Have you read
https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingStatusCodes
? Then keep track of users' markers with an object referencing a Marker array, such as user['bob'] = [marker 1, marker 2, etc.] and switch on and off based on these user names.
When you run into a specific problem come back here.
Yes you are right you should use geocoding to get the user to the exact spot he wants.Then you can add the user markers in your database together with the userid so you can filter them by mymarkers.