SSRS currency format - reporting-services

I have great difficulty getting the last finished on the report im building. It has to show a value, a currency value. the only problem, which is a small one, is that the report builder is showing a ',' as a 1000 seperator but i need it to show a '.' instead, for example:
right now it shows:
12,345,678.00
i need it to show:
12.345.678,00
I have read a lot of questions in here and tried out this code:
= (new Decimal(11123.55)).ToString("€#,0.00;(€#,0.00)",
new System.Globalization.CultureInfo("es-ES"))
But that aint working as well, then it outputs this in the report:
€11853724112355
I am all out of ideas now.
Thank you in advance

You should leave the value of the cell as numeric because this is better in certain instances, for example, exporting to Excel. Generally, data and presentation should be separated.
Your report probably has the Language property set to en-US. Set it to es-ES and set the Format property of the cell to C and it should display properly.

Related

Formatting number by 0.## in report server

I'm encountering an issue that bothers me a lot for days.
I've been searching online via 0.##, #.##, number formatting, etc., but with no conclusion
I'm setting up a report in report server and there's a column called 'account available',
which might has a number like 123; ;123.4; 123.45; 123.4567; 0
My way to create a formatting rule is 0.##; 0.##; 0
123-->123. I DON'T WANT this formatting, I would like it to be 123
Below are all good, i'm very satisfied with these formatting.
123.4 --> 123.4
123.45 --> 123.45
123.45670 --> 123.46
0 --> 0
is there any kind person who would like to guide me to modify this issue? thanks a lot in advance!!
This issue is a bug in Excel.
The number renders fine in SSRS but if you apply the same format string to a cell in Excel 123 is returned as 123. as you found out.
To get around this bug in Excel you have to use an expression to set the format based on if the number is an integer or not. When exported to excel this displays as expected.
You can use an expression such as this in the format property.
=IIF(Fields!myNumberField.Value = CINT(Fields!myNumberField.Value)
, "0"
, "0.##; 0.##; 0"
)
In SSRS it looks like this...
When Exported to Excel it looks like this
In both images, the left column is the unformatted data and the right column has the format expression applied.
Finally:
This bug is mentioned in several places but I'm not sure if it has been reported - it may be worth checking and reporting it yourself.
Excel number format to only show decimals when necessary
https://superuser.com/questions/1645944/number-format-excel-bug

Issues exporting SSRS to CSV with textbox names

So I'm trying to export my SSRS to .CSV. The layout of my report is like this:
Everything does work fine, on my VS. However, when comes the time to generate it I get this:
I've read a few other post on Stack Overflow about how I can change my SSRS config for noheaders and ASCII. Thing is, people tried to set column names programatically, but here I only have expressions for cell contents and a current layout. Is there a way to make my CSV lay out look like my reportbuilder layout? Or is my problem the same as when people try to set the column programatically
For each data field you want to export set the DataElementName to match the field title and set the value to the DataElementOutput to output the field.
For the header textboxes set the DataElementOutput to NoOutput.
For more detail check the following microsoft link
https://msdn.microsoft.com/en-us/library/dd255251.aspx

RB How can I use Lookup expression on DB for report visibility

This is 2008R2. I have a dataset with a query "DESIGN" on a database with results for a export format like this:
| pdf | true |
| rdl | false |
| excel | true |
My Goal is to change the visibility depending on the export format of the report. The property of the visibility can be changed in the Database, so I need it to be dynamic. If I export to pdf, a specific textbox or tablix should hidden... I tried Lookup on a separate textbox which gives me the RenderFormat. And used the expression in the Hidden-property.
=Lookup(ReportItems!Textbox1.Value
, Fields!RenderFormat.Value
, Fields!Hidden.Value
, "DESIGN")
I also tried it with 1 and 0 values in the database and converted it to CBool(...) but it appears to be a bug or something like that, because the value of the Textbox1 just disappears when the report is rendered. So there is no possibility for the Lookup to work.
With Globals!RenderFormat.Name instead of ReportItems!Textbox1.Value it is not working either...
It would be great if you could help me!
There can also be an easier way... if you know it... Thank you!
Found it!!! A solution to the problem is the following:
1) First I have to create some VB-Code: Rightklick beside the ReportBody to open the ReportProperties. Than the following Code should be used to create a valuetype string variable:
Public Shared Dim rf as String
Public Function Setrf (ByVal var as String)
rf = var
End Function
2) A TextBox should be added to fill the variable. The TextBox expression should be:
=Code.Setrf(Globals!RenderFormat.Name)
3) The Tablix Propertie Hidden should get the following Lookup expression refering to the Code:
=Lookup(Code.rf,
Fields!Reporttyp.Value,
CBool(Fields!LegendeVersteckt.Value), "Design")
This is for the case of true and false being 1 and 0. Now on differen export Format it is Hidden or not. :)
I was hoping this would be as simple as using a report parameter which could then be fed into the WHERE clause of your query. However, parameters aren't allowed to use the Globals!RenderFormat.Name field (I don't know why). I'm not sure about how to use a lookup expression to pull back this as you asked for, but I used the following nested IIF function to toggle visibility in the Hidden expression of a textbox based on rendered format:
=IIF(Globals!RenderFormat.Name=nothing,true,
IIF(Globals!RenderFormat.Name="EXCEL",false,
IIF(Globals!RenderFormat.Name="PDF",false,true)))
As you were going to have a single query that holds the boolean visibility values anyway, this option may not be bad. The only problem will be maintaining it in the many different locations you probably need it. I would recommend storing it in a hidden textbox and then copying and pasting from that as needed so you have one place where you change the function and you don't have to worry about typos but once.
In my testing, I found that the Render Formats are case-sensitive, and that for the report viewer rendering, the format name is RPL, not rdl.
The most comprehensive list I could find of Rendering Formats in correct case is below and came from here: http://msdn.microsoft.com/en-us/magazine/cc188712.aspx
HTML3.2
HTML4.0
HTMLOWC
MHTML
IMAGE
EXCEL
CSV
PDF
XML
I know it's not exactly what you wanted, but hopefully it helps.

Access 2007 - Using results of an equation inside another equation on a report

I inserted three text boxes to test how this could work:
Text81: =1
Text82: =2
Text83: I want this one to be the sum of Text81 and Text82
Thanks in advance for your help on what I think is a pretty simple problem.
There are a couple options that spring to mind.
First you could always modify the data source for the report to include the calculated field.
Second, which is what your question drives at, you can do something like this:
=[Text81] + [Text82]
Should work when typed into the Control Source of a TextBox provided Text81 and Text82 are the data field names from the Data Source of the Report. If they are not you would put the corresponding data field names in the square brackets []
Hope this helps

How to display a CSV list of data in a column of an RDLC file

I have a report embedded in a web application that works fine but I need to make a tweak to it. Right now the report basically will dump all the rows from a view, I have some filters set up but I have disabled them to simplify this and get this working. I spent all day yesterday trying to get this to work correctly, attempting many different combinations of things. The end goals is to take a set of data and display it as a comma separated list within the same row that the data belongs to.
My data is a list of projects, each project can have multiple personnel associated with it, instead of having a new row for each person we want all the people in one column separated by commas that belong to the project. A trivial task in SQL.
SELECT dbo.APM_Project.Code, dbo.APM_Project.Title,
(STUFF((SELECT(', ' + vi.NameFirst)
FROM view_OrganizationPerson vi
JOIN APM_Project as p ON vi.ProjectId = p.Id
WHERE vi.ProjectId = APM_Project.Id
AND vi.Role = 'Principal Investigator'
AND vi.Status = 'Active'
FOR XML PATH('')), 1, 2, '')) AS PI_
FROM dbo.APM_Project
Also I have tried the SUBSTRING method of producing the comma separated list, all of these methods work great when I run the SQL script, they also work when I preview the data from my dataset in visual studio so something must be right. I get the results I want however when I run the application, I get no data in the column using the expressions of
=Fields!PI_.Value
or
=First(Fields!PI_.Value, "DataSet1")
So I'm not entirely sure where to go from here. This seems like it should be a pretty easy task, also when I run the expression
=Fields!PI_.IsMissing
it comes back true, so something is being lost at runtime and I just can't figure out what it could be.
All other data of the project is present within the text boxes, just the PI_ column is left blank.
Question is:How do you display a CSV list of data in one column of a row of data in an RDLC file?
Turns out this is valid. I needed to update the .aspx page with the changes made to the data adapter itself since I changed the data set.