I am using SSRS 2008 R2 and have the following map.
In my opinion, it looks very ugly with all of the zip codes showing for each area so what I would like to do is only show the zip code when the area has more than 10% of the total number of people in it. I was reading here (Troubleshooting Reports) so I don't know if this is possible. A coworker was telling me that for Charts/Graphs in SSRS there is a #PERCENT that would allow me to do something like:
Visibility Expression: =#PERCENT > 10
but I couldn't get it to work. Any help would be appreciated!
I actually did something extremely similar once. I ended up just setting the label expression using a couple of aggregate functions:
=IIF(SUM(Fields!Quantity.Value)/SUM(Fields!Quantity.Value, "DataSet1")>0.10,Fields!ZIP.Value,"")
Worked fairly well.
Related
Hi I am converting the crystal report to the SSRS reporting but i am new to both the reporting tools in crystal report there is lots of fields that are calculate but i am stuck at this one field is calculate like ,
"!" & {MM.JobNumber} & "!"
and i am not sure what it does so any insights would be very great.
Based on the information provided, this formula simply concatenates two exclamation marks onto the field {MM.Jobnumber}.
The output for this would look something like this
!Jobnumbervalue!
If you haven't tried already, http://www.crystalmigrater.com/Default.aspx is an extremely useful tool for what you are trying to accomplish.
I'm using now SQL Server 2008 R2.
My website shows the report exactly as it is, including the container where the parameters appear (the client prefers it that way).
However, my website solution includes localization (Portuguese, English, Spanish).
I've tried to translate the parameters by creating one parameter for each language, and then show them according the selected one. It didn't work in SSRS 2008. Because I don't know how to find the visibility properties of prompt.
Does anyone know a solution... Or if SQL Server 2012 has solutions for translating parameter's prompt, or conditional visibility?
Thanks.
The only solution I've found so far (SSRS 2008, 2008R2, 2010, 2012) is to break the DRY commandments, and duplicate the reports with language codes as part of the report name (e.g. MyReport_sp.rdl, MyReport_de.rdl, etc) and then place a web service between the client request and the SSRS instance. The web service then has to field the request to the correct report based on a "Culture" parameter passed with the client's request.
This is NOT a good solution, though at least the Culture param is used in localizing the rest of the report as well. We still have hopes that at some future date MS will add prompt localizability and we can rename the report to MyReport.rdl and just have everything actually localized. Hmm, what a concept...
Another workaround would be to just put a number in the prompt for the parameter then prefix the label of each parameter with the localised version by either using "get values from query" or by using the expression builder with a switch statement in the label expression.
For the get values from query option you would have a dataset something like this if you have the translated versions in the query:
SELECT ParamLabel, ParamValue
FROM MyLocalisedParameters
WHERE UserLanguage = #Language
Or like this if not:
SELECT
CASE #Language
WHEN 'pt-PT' THEN 'Selecione Departamento: ' + ParamLabel
WHEN 'es-ES' THEN 'Seleccionar Departamento: ' + ParamLabel
ELSE 'Select Department: ' + ParamLabel
END AS ParamLabel
, ParamValue
FROM MyParametersTable
in both cases creating and assigning the Globals!Language to a Parameter called #Language.
Or if using the expression builder for a hardcoded set of values it would look something like this:
either way the end result would look something like this:
Not perfect but functioning and easier to maintain than several copies of the same report.
If you want it to look a bit tidier then just have the Parameter prompt as only one entry in the parameters list and set it to the default value to avoid repetition on every line.
There is none...
As per connect.microsoft.com, this feature has been requested after SSRS 2005 has been released, and while it is on Microsoft's TODO list, the programmer time to do this has never been allocated, and hence in 2012, SSRS is still not capable of doing that.
Although it's (with much effort) possible to translate everything else, it's not possible to translate the parameter prompt.
There is NO conditional visibility either, visibility of parameters is fixed.
Also, there is no way having SSRS use a supplied language instead of the one set in the browser language settings.
The only thing that you CAN do is write a C# program that loads your XML file, get's the report's parameter name(s) (and possibly the report's name as well), looks them up in a database, and automagically creates N reports for n languages.
Then, you have to redirect your users to the report in their language.
You then only need to write an upload tool, because you won't want to do that by hand.
The other way is to use the ReportViewer control, and re-implement parameter selection.
I think there's CrissCross that tries to do that, but it failed in all but 2 of the reports that I tested.
An evil hack would be:
parametername: babla_language1 / blabla_language2 / blabla_language3 / blabla_language4
and then use jQuery to get that string. do string.split('/')[index_of_language]
and then prey that / is never within "blabla_languageXY"
Edit:
I actually did that. You have to use setInterval to do it, because there is no way to detect change when you select a parameter.
I'm writing a report in SSRS. I have a report with some fairly long expressions although the calcuations are simple additions, subtractions and mults and divs. Is there a way to capture the results of an expression for use in a calculation in another field without having to repeat the whole original calculation? I already do part of the calculation in underlying views. Is it possible to do something similar to referencing a 'Field.xxx.Value'? I'm using 2008 R2 for now but will be moving to Sql Server 2012 soon.
Supposedly the result of the complex expression that you want to reuse is located in a Text Box named "amt3". Then you can use this to, say, Color it:
=iif(ReportItems("amt3").Value < 0, "Red", "Green")
Are you wanting to repeat a calculation or use a calculated value?
If you want to repeat a calculation you can use inbedded code. Just write some VB that takes in whatever parameters you want and have it output the results.
I have some fields I currently populate with a P0. The results is like this:
2,434%
I want however something like this:
2434%
How do I do this?
Have you tried something like 0000%? Or alternatively, an expression like:
=right(format(Fields!YourField.Value,"#%"),5).
I don't have BI studio open right now so I can't test these. The expression would of course convert the value to text, which maybe problematic when you export the report to excel.
####%
Note: Unfortunately, this does not lock down to a max of 4 characters (like I would expect/wanted), but it's close enough.
I have a report that has two tablix on it. I'm trying to control the visibility of the tablix using an expression. When i hard code in a boolean value of 0 or 1 the visibilty works. When i put in something like the following
=cbool(iif(First(Fields!bGeneralQuestionDisplayed.Value, "ClassificationNarrowed")=1 ,1,0))
it does not work. I've profiler to verify that the query is running and returning the results. I've also created a text field on the form rumming the same expression.. the result is a 1 or a 0.
anyone have any idea as to what might be causing the issue.
thanks
shannon
According to the FIRST documentation, the second parameter represents a group. Do you have a "ClassificationNarrowed" group defined?