SSRS Page Break after custom # of group - pdf

I am working on a SSRS report. It is a Tablix with 1 group by city. I would like to have 4-5 records per printer page in PDF. Currently, it is printing 1 record per printed page. This is because I have set a hard page break after each group. I can remove that hard page break but I'm unsure how to get 4-5 on each printed page. I'm not that good with SSRS expressions. Any help is appreciated.

I would handle this by creating another column in your dataset which groups 4 or 5 cities. say the first 5 as 1, then the next 5 as 2 etc.. and then add a parent group to your city group using this column.. then set your page break on that group..

Related

SSRS Bar Chart Filtering Incorrectly

I am trying to create a chart showing the 10 highest-performing teams according to their "proportion of target achieved" score.
My dataset comprises every day worked by every individual in my organisation. The data is grouped in a stored procedure by month, team, job role, area of the organisation...
My SSRS report takes this data and sums it at a report level, based on a half-dozen parameters (mainly to the above groups).
The data is presented via a table, showing (for a given person/group/category) the hours worked, actual contact time (time with clients), expected contact time (time they're meant to spend with clients), and the proportion of their target they are achieving (actual contact time / expected contact time). All of this is reported for each of the last 6 months.
I.e.
I wanted to create a bar chart showing the 10 teams with the highest proportion of target achieved values. This variable is calculated in SSRS in order to allow for the data to be more flexible.
SSRS wouldn't let me use that calculation in a chart filter, so I added a denserank (called TeamOrder) for the teams in the stored procedure.
This is where the issue arises.
TeamOrder is used in the filter, and set to <= 10. 10 teams are displayed in the graph, but not the 10 that have values of TeamOrder equal to 1-10. The top couple are right, but in 10th position, for example, it's displaying the 32nd-best team.
Weirdly, when I set the filter to TeamOrder = [value], then it displays the one (correct) team (including the correct number 10 when TeamOrder = 10).
I'm at a complete loss as to what might be happening; any help would be enormously appreciated.

Crystal Reports 2008: Subreport is affecting my "sum" formulas in the main report?

This issue is slowly driving me mad. My report structure is thus:
Group 1 - Department
Group 2 - Secondary Department
Group 3 - Author
Group 4 - Task
At the top level (Department) I want to show the length of all tasks. This is collected from a database and is in seconds. An example column:
5
7
14
12
23
8
8
I expect this to be 77. When the user drills down to the 4th level, Task, they can click a link that takes them to a subreport.
This subreport is a task audit (i.e, information on each time the task was interacted with (such as opening, closing, saving etc.) typically, there might be 3 or 4 rows in the audit).
The subreport is linked to the main report via the GUID of the task. Ergo, when the user clicks the link on level 4, they see an audit for that task.
With no subreport, it works as expected and the total length is set to 77 seconds. However, with the subreport, the number is much higher, for example, 245 seconds. The number is always the actual length of time * the number of times the task appears in the audit (if there are 4 rows in the audit, the length is 4 times higher than it should be)
Is there ANY way I can make this link 'one-way'? I do not want my subreport to be affecting my actual main report, I just want it to be a link to show another report, filtered by the task's ID.
Failing this, is there any other way to properly calculate the sum of the data in this column whilst ensuring it ignores the subreport? The subreport uses a different table and does not have the same column.
Thanks

rails order by field and get 10 items from the middle

I have build a page that displays a list of ratings in an desc order.
I want to display only 10 items at a time. how do I select only, say the 11-20 rows
from the ordered array.
Is it possible to handle this in the query itself, or do i have to fetch the whole table and screen the relevant items?
#pics = Rating.order('rating desc').limit(10)
In this specific case, use .offset(10) in your current query.
In general, search for "rails pagination" on google or here on SO.

Duplicate fields because of my SQL

IF ({PICT_Picture.Job_Print} = TRUE) THEN
IF({PICT_Picture.Process_Name}=["SMALL MOULDING","LARGE MOULDING"]) THEN
"YES"
ELSE
"NO"
ELSE
"NO"
PICT_Picture.Job_Print - is a tick box that allows me to print a picture on a production route card.
PICT_Picture.Process_Name - is a drop down box that allows me to select what process a picture is for.
The problem I am having is if I have multiple images attached to a product that is on a generated report, duplicated rows will be created for each picture I have attached regardless of being under LARGE MOULDING, SMALL MOULDING, INSPECTION, etc.
I have very little knowledge about crystal reports and SQL, I am looking for a line of code that will only generate one line per product regardless of how many pictures are attached.
If you require any additional information please say and I will try and attach it as soon as possible.
Thanks
~EDIT
{ORDE_Goods.Job_Number}=previous({ORDE_Goods.Job_Number})
I put this in suppress no drill-down, It worked right away.
It got rid of all of the duplicate jobs.
The best way to achieve this in Crystal reports is to create a group. Group on your "primary key" then move all your fields from the details section of the report canvas into the group footer section and suppress the details section. Further explanation:
Before- duplicating records:
After (detail section suppressed, group added on order number- we want 1 record per order number):
L
If you're executing SELECT query can you not add DISTINCT to select one line per product.
For example,
SELECT DISTINCT Product, ... FROM YourTable

RDLC Detail pairs

in and RDLC, on a table each row of info is displayed as two RDLC details rows.
ie
Bob 1234 bobo st 512-512-5122
Jones Austin Tx, 78660 512-512-5133
but when paginating the report, the data pairs get split, with "bob" on one page and "Jones" on another.
Is there any way to force the RDLC Generator to keep these pairs on the same page?
Thanks,
Eric-
Go to Tablix properties
select General
select Page break option
Mark Keep together on one page if possible