extra spaces in report - Report Builder - reporting-services

Good Day. I hope everyone is well and safe. I am writing a report that is counting the number of times an event occurs, however when I run the report, it has a lot of extra spaces in it. I have attached a sample of the output. I have tried playing with cell padding, and table spacing, just cannot figure it out. Hoping one of the brilliant people here could offer a suggestion. It seems like the number of results is influencing the number of spaces, but I don't know what I don't know.
Again thank you for your support.
Thank you.
Sample number 1
Sample number 2
report builder screen
dataset
query

Related

SSRS formatting numbers

I have a building a report in 2008r2 report server and have a field that I need it to be an avg and only show #.## in an iif statement. The code that I am using below just gives me an error(#Error) but if I take out the formatting it runs correct just is about 20 numbers long. Where am I going wrong here, please help, the last 3 pieces of hair I have left is begging you.
=Avg(iif(Fields!iEventID.Value=20,format(Fields!Letter.Value,"#.#"),Nothing))

SSRS Returning 1 Single Figure Differently to the rest of the resultset

This is a really strange one. I have a dataset which returns a small number of columns and a very small number of rows (49 in my example). I have an SSRS report with a table returning the data from that dataset.
Everything works perfectly, as I would expect........expect one value in one row! It does not return the figure that is in the dataset. Every other figure shows exactly as it is. This occurs in VS and once deployed.
So, in my dataset, the figure shows as -0.955980288917914. In the report, which is formatted to show as a 1 decimal place %, I would expect to see -95.6. It doesn't, it shows -999999900.0%. I have other negative figures in the dataset which show correctly. Its just this one figure. All the other figures show a similar number of decimal places.
I know, I could do the percentage calculation in SQL and just return it to the report but I'm curious as to why this behaviour is happening.
Any help or suggestions would be greatly appreciated. SQL version is 13.0.5292.0, Visual Studio SSDT is 15.9.16 and Reporting Services is 2016.
Thanks
UPDATE:
Sorry for the delay. Below are some screen snippets.
This is the data as shown in SQL Server, you will see all numbers have similar decimal places.
This one is from VS and shows the simple design. The highlighted cell is the one holding the % value
This is the output of that column. As you can see, its only that one figure that is completely wrong. All other 48 figures are correct.
Thanks again for your help

Custom Sort Order in SSRS 2014

I am having to create a custom sort order within a SSRS Matrix, it returns 2 rows of data and then a total. When I add the custom sort order within the Row Group Sort Order, its moving the Total to the top and the relevant rows below it instead of keeping the total on the bottom, below is the code that I am using, can someone point out where I am going wrong, think the time of day is getting to me.
Thanks
=iif(Fields!loan_amount.Value="<£1000","1",
iif(Fields!loan_amount.Value="£1000+","2",""
))
In response to my follow on question, I cant post the entire output of the report as it contains company personal data so what I have done is go a screen grab of the Tablix in design view, this is currently meant to be ordering by revenue but when you look at the second screen shot you can see that this is not happening. I went through and checked the output of my stored procedure and its passing the revenue out as a decimal which is fine. I have just put the data in to a straight forward table with no grouping and then ordered it by revenue and it works fine, it appears to only happen when I am putting it in to a matrix. Any help would be much appreciated.
Try this as the sort expression:
=IIf(Fields!loan_amount.Value="<£1000",1,
IIf(Fields!loan_amount.Value="£1000+",50,99))
An empty string will sort to the top. Using numbers for a sort is more reliable. Leaving a gap between numbers allows you to add some other conditions in here later with a little less pain.
Hope this helps you out.

SSRS Group Header repeat only at Top of page

I have been tasked with cleaning up some outstanding issues with my company's invoices. It is a very complicated report (four separate invoice formats are combined and determined conditionally because the application that calls them only allows 1 invoice format). I am going to try to keep this limited to just the current issue, but will provide as much info as necessary to solve the issue.
There are tons of existing questions about repeating group headers, like this one and they have helped me solve most of my problems, but I have not seen the problem I am still having addressed. I am sorry if I missed it!
The issue: The last tablix on my report is finally repeating the headers on all pages, but I now have the issue where when there is enough room, the header will display in the middle of the page below the second to last tablix.
Unfortunately, adding a page break breaks the page numbers even with reset page number set to false. (I have explicitly added the xml tag and it still resets)
What is the best way to only show the group headers at the top of the page when there is extreme variability in the size of many elements in the report (note fields that vary between one short line and epic novel length and images that vary in physical size and quantity).
Thank you for taking the time to read and help with my issue, I will continue searching through the similar questions that writing this prompted.
I will wait to accept this as THE answer, in the hopes that someone out there has a brilliant solution that has escaped me.
Based on comments here https://www.mssqltips.com/sqlservertip/3482/sql-server-reporting-services-ssrs-controlling-report-page-breaks/#comments
It appears my options are:
1. Accept that some pages will have two headers
2. Accept multi-page reports displaying page 1 of 1 on every page
3. Rework the report to not use a subreport
Thank you to everyone who has taken the time to consider my problem!!
#WhatEva sorry about the slow reply; am in and out of work this week and next. Capsule response: imagine the final, correctly formatted report, and imagine that you have all the text (non-header, non-footer) data in a single table. Add group columns as necessary to allow you to trigger the relevant headers and footers. You're likely to need a sequence id column to govern the order of printing of the rows. The report you're trying to write would have generated the text body fields; rewrite the report data sets as SP procedures to insert those text rows into the table, and ensure the group columns are filled out suitably to generate the right headers etc. Then write an SSRS report to pull that data and use the usual mechanisms to manage the headers and footers. It's hard to be more specific without knowing details, and there are certainly limitations on this approach, but it can solve some problems.

Adding Access totals cause report to not run

I am trying to add a few totals (sums and counts) using the wizard to an Access report. When I add them to the report and try to view the report, the report fails. Without the totals the report will display. The only thing I can figure that may be a factor is that the query being run to populate the report takes a bit to execute. The query runs a series of other queries which takes longer than normal to generate the report.
ETA: Thank you dmoody007 for your help in rooting out the problem and confirming my suspicions.
The question is a little vague. Any of these can either display errors or cause the report to not run.
Use Control Name in detail section of report for totals field (example: Name is Overtime so total of overtime should appear like =Sum([OverTime]))
Be careful not to name your controls the same. Detail control can be named Overtime. Your total of overtime should NOT be named overtime as well. Name it like Tot_OverTime otherwise you could end up with a circular reference.
If counting a text field, know that null fields are an issue. Suggest counting identity seeds or fields you know always have a value.
Make sure each control in detail you plan to sum, is formatted for numbers. If you look at the control property, format should be a number and you can assign decimal places. If not, you need to check your query or source table to ensure field is properly assigned a format.
One good tip. Add one field to total at a time. A little tedious but ensures one works before adding the next. Always recommend this to newbies until they get real comfortable making reports. Easier to debug.
Good Luck.