I'm currently returning a string of Jira Keys in an SSRS report (e.g. ABCD-1234, ABCD-1235, ABCD-1236, ABCD-1237), for formatting reason I don't want this to line break in the middle of a key.
e.g. I want this:
| |
| ABCD-1234,ABCD-1235, |
| ABCD-1236,ABCD-1237 |
| |
Not this:
| |
| ABCD-1234,ABCD-1235,ABCD- |
| 1236,ABCD-1237 |
| |
I can't seem to find a chr() or chrW() code to replace the current dash being returned by the SQL query (called as a proc so can't be amended directly in SSRS itself). Is there a way to replace this in SSRS or am I best looking to amend the original SQL proc to return a non-line breaking dash?
As niktrs stated, ChrW(8209) can be used to replace the line breaking hyphens. It appeared this wasn't working due to the Report Builder preview not rendering this character correct. Upon publishing the report, the non-breaking hyphen is rendered correctly on the screen.
Although, this do not appear to be supported in exports of the report such as pdfs and is not rendered correctly again:
https://i.stack.imgur.com/zK0tG.png
Related
I feel like I'm missing something very obvious, but searching hasn't given me a solution and I hope someone can help.
I am working on a simple chart. X axis is the date (day), Y axis is a simple number (1 to 100).
I have totals, for 3 different sites, per day. I need a line for each site on the chart.
Day | Site | Value
---------+--------+-------
Monday | site X | 30
Monday | site Y | 45
Monday | site Z | 20
Tuesday | site X | 35
Tuesday | site Y | 26
Tuesday | site Z | 12
and so on..
There is only 1 total value per day, per site.
I am trying to create 3 lines on the chart, one for each site but I can't figure out how to filter on the series level. (I'm working on a very large date range, so lines work better visually rather than doing a series group of bar charts, or even stacked bar charts)
I originally tried the multiple dataset work around (using an expression and something like
sum(field!total.value, "site X")
but that didn't work (it showed only a straight line, the first value I think) . Now, I have one dataset, but I can't find a way to filter series so they only show for one site.
I also tried this IIF
=iif(Fields!site.Value = "site X", fields!total.value,0)
but that gives a weird looking line.
I can't believe this is not possible in a chart in SSRS, I mean, it's pretty basic, so I must be missing something.
Thank you for your help.
You need to set up a chart as follows
The Values are the actual numbers you are attempting to chart
The Category groups as set up here are the individual dates.
The Series Groups are your Sites
At this point I then set the Horizontal Axis to be in Scalar/Dates format so the designer looks as follows
When you run this report using an adaptation of the (brief) dataset example above you get the following
I have a dataset with a query "COLORS" on a database with results like this:
| pdf | red |
| rdl | black |
| excel | blue |
My Goal is to change the backgroundcolor depending on the export format of the report.
The Colors can be changed in the Database, so I need it to be dynamic.
If I export to pdf, the backgroundcolor should become red... Could I use a Filter in the backgroundcolor expression like the following? If yes, how?
=iif(Globals!RenderFormat.Name=Filter((Fields!Format.Value, "COLORS"),"pdf",true,???),
I got this going with a bit of work using the Lookup function. This is 2008R2 and above only, but the fact that you're already looking at Globals!RenderFormat.Name, which is also 2008R2 and above implies this is OK.
My first thought was to something like:
=Lookup(Globals!RenderFormat.Name
, Fields!RenderFormat.Value
, Fields!Color.Value
, "Colors")
But this threw an error.
However, as a workaround I set up a textbox in the report to display =Globals!RenderFormat.Name and then based the expression on the report item:
=Lookup(ReportItems!Textbox1.Value
, Fields!RenderFormat.Value
, Fields!Color.Value
, "Colors")
For some reason this works fine where the other failed.
You can set the textbox which displays the render format to hidden if required.
Other options... Typically for styling you have the database approach which you're already using and doing this through embedded report code, or a DLL deployed on the server.
Just embedding code in the report doesn't really help give you the dynamic styling you need, which leaves the DLL option.
This would involve creating a DLL with some simple function that could return colour values based on a parameter, i.e. the render format global variable.
The advantage with this is that there is only one code base so updating the DLL would apply it to all reports on a server.
This blog post has some details on how to implement this with a server-side DLL.
The disadvantage is that it's complicated and does involve getting the DLL running on the server, which is not always trivial.
I have a report MRpt which has a subreport SRpt. MRpt has 2 datasets ds1, ds2. SRpt has 1 dataset dsA. All datasets are generated by different stored procedures. I've been trying to pass the data from the master report datasets to the subreport using various suggestions here but it doesn't seem to help so far. Here is a short description of what I try to accomplish.
The MRpt has a tablix that displays some data as below
(For each PartNumber in MRpt, the SRpt will display the history of credit return approval)
PartNumber| AskedPrice| AskedQuantity| ApprovedPrice| ApprovedQty
PN_1 | 2.00| 50| 1.50| 50
InvoiceNumber| InvoicePrice| InvoiceQty| ApprovedPrice| ApproveQty
240204 | 24.25| 70| 0.50| 50
220203 | 25.50| 1570| 2.50| 1500
PN_3 | 50.00| 20| 27.50| 20
InvoiceNumber| InvoicePrice| InvoiceQty| ApprovedPrice| ApproveQty
240204 | 60.25| 100| 30.50| 70
220201 | 50.50| 2000| 26.50| 1500
220109 | 40.50| 1000| 20.50| 1000
I need to pass to the SRpt these values from the MRpt datasets: ds1.CustomerID, ds1.StartDate, ds1.EndDate, ds2.PartNumber.
Is it possible? If so, how do I go about to do this? Where should I place the SRpt so it will be shown as above illustration. I'm currently getting error: SubReport could not be shown. If I run the SRpt alone, it displays data correctly.
Please help.
I added some screen shots so you guys can help if I did something wrong.
This is the subreport design view
This is the subreport properties from master report
This is how I hook up the parameters
If you have properly set up the values you specified as parameters in your subreports then it should be no problem to send them from the master report. There should be a listing of all subreport parameters when you include a subreport and there you would hook up your params.
I have a Form that looks like this:
Section | Length | Number
Dropdown of sections | Integer | Integer
Then I have a SQL that looks like this
Section (List of sections) | Weight (Weight of section) | Cost (Cost of section)
The user will chose the section from the dropdown, enter the number of the section required and the length of the section. The user will then click a button to add the data to a table underneath the form.
On click I need the chosen section's length multiplied by number then multiplied by weight, and chosen section's length multiplied by number and then by cost. Which will then be displayed in a table like this
Section | Total Length | Weight | Cost
152x152x25 | 5000 | 25 | 600
It must be able to add quite a few entries to the table.
Sadly, I'm a designer and not a programmer, so if I could get some help, I would really appreciate it.
edit
The answers I used (152x152x25|5000|25|600) are just an example.
I'm going to use a normal Linux server to deliver an HTML page containing the form and the table. There will then be a "Print" to print the table and "Send" to email the table. I plan on populating the SQL database myself.
I have a report that shows financial data by year along with a few other bits of static data:
every time I try to put in a Column group, it does either above or below the static data:
FiscalYear
StaticData1 | StaticData2 | StaticData3 | StaticData4
Or:
StaticData1 | StaticData2 | StaticData3 | StaticData4
FiscalYear
What I want is that I get the static data and then the dynamic data (which may be 1 or 20 additional columns) right beside it with the corresponding data below
How do I get the report to look something like:
StaticData1 | StaticData2 | StaticData3 | StaticData4 | FiscalYear | FiscalYear+1 ...
Thanks much!
See Dynamic Grouping to learn how to make your matrix groupings dynamic based on report parameters.
Wait a second. I think that doesn't answer your question.
It sounds like you're asking how to make more columns appear to the right of your static data at the same level of grouping. The only thing I can recommend is to modify your recordset to return a row for each final matrix cell. This usually involves a partial unpivot.
You have something like:
Row1 Static1 Static2 Year
Row1 Static1 Static2 Year
instead, you need this:
Row1 'Static1' Static1Value
Row1 'Static2' Static1Value
Row1 'Year' YearValue
Row2 'Static1' Static1Value
Row2 'Static2 Static2Value
Row2 'Year' YearValue
I hope that makes sense. I don't have a lot of time to go into much detail.
One other thing that might help you is to experiment with dropping a Rectangle into one of the matrix detail cells. Once you have that, you can drop as many text boxes into the Rectangle as you want and position them as desired. This is one of the ways to get extra values to show even though you only want one grouping level.