Display Records Horizontally Instead of Vertical in Cells, SSRS - ssrs-2008

I'm trying to display multiple values for one drive by adding a column for each additional record assigned to a drive. For example, a drive ID is unique but can have multiple promotional incentives assigned to it.
For example, if we go to a university on 1/23/2015, that will a unique event or record in the DriveMaster table, but if we are giving away T-Shirts and Pizza, those two records will be assigned to the drive in the EquipmentDetail table.
In SSRS, I'm trying to create a sub-report that will display the promotional items on one line instead of adding additional lines for each promotional item. See screenshot below.
What I'd like to have happen is have the each drive only account for 1 row, and each promotional item listed in a new column to the right. See mockup in Excel.
Is there a way to handle this? I know there is in Crytal Reports, but I can't figure this out in SSRS. I've tried using a Matrix, but I can't see to get the columns to grow if there are multiple incentives.
I added a column group on the Description field, and it looks like that it is close, but that the grouping will create blank spaces (cells) in it.
Thanks,

You have to set a Column Group for your promotional item in your Matrix.
Hope that helps.
Edit:
It looks like there are some areas that contain no data (because of your groupings)
We can do something like the following:
In your query you can use the 'over'
Select DriveID, PromotionItem, ... ,
ROW_NUMBER() Over(Partition by Select DriveID, PromotionItem, ... Order by PromotionItem)
AS ColumnGroupNumber
Then in the Promotion Item group that you have change the field it groups on to the ColumnGroupNumber (or whatever you are going to call it). Just don't change the field in the detail row, or you will not see the details.
I have used this solution before. I found it here.

Related

How to Keep First Row and Second Row of Ms. Word Table in one page in BI Publisher Report?

My institution is using BI Publisher (Ms.Word add on) with Peoplesoft.
Now, I'm doing a report that will print a name and it's description in table format repeatedly. In some cases, the first and second row of the table will be separated in different page. I already tried to check the "Keep Lines Together" and deselect "allow row to break across pages" setting, but only worked with static table, not with table contains BI Publisher fields.
This is the screen shot (look at the red arrow).
First and second row of table are separated in different page
Anyone able to solve this issue? Thanks.
it was done..just create 1x1 table and set it to not allow break across pages. Then, put the the main table into that 1x1 table. Place the repeating tags outside the 1x1 table.
I solve this problem by this way.
Insert any filed into the bottom of the table,then change the filed property as
<?split-by-page-break:?>

Removing duplicate record text but keeping unique values

In our system, it shows each charge as a record, despite the account being the same.
Crystal reports image
How would I go about doing this?
Also, is there a way to show it like this even though they are all seperate records?
Option 2
You can solve this using sub reports.
In main report take distinct record and place the fields Account and city in detail section.
Now take sub report and place it after the first 2 columns in detail section but take care that you won't select the option distinct records that means you retrieve all records. In sub report place Charge type, charge fields

Listing multiple values from the same record multiple times in crystal reports

I have a PDF "student record" that we need to print the values on. Because of this, all values must be printed where they are listed on the pdf and I can't just put everything in a list format. I have attached a screenshot of the bottom lefthand corner of the PDF as an example.
Obviously, grouping wouldn't allow me to print out different values of the same record like this. It probably wouldn't allow me top specify which record goes on which line exactly either.
Is it possible to make a formula field that pulls the correct record for each line?
For example, dragging the "Student.Relationship.FirstName" field always lists whatever 'first' relationship is on their record.
Can I make a formula that specifies that will pull the second relationship record instead of defaulting to the first?
Can I make a formula that can specify "student.relationship.firstname" WHERE student.relationship.type = "father"?
SUBREPORTS.. I think that is what you need. Create a grouping on STUDENT, add Extra sections for the same group and on each section insert a different Subreport that has details as required.
Pass the Student ID as the sub-report link.

Erroneous duplicate rows in BIRT report

I have a problem with a BIRT report I'm working on where I have a nested table in the report. The outer table contains data to do with an item on an invoice, while the inner table contains stuff to do with price banding for labor charges. I've written a separate DataSet which gets the inner data, bound by parameters to data in the outer table. Now, when I preview the inner DataSet in BIRT using the defaults I've given it, it returns two rows of data for that bill number & item number - a normal rate & an overtime rate if you like. When I run the report in full over the same data, the outer table stuff is fine, but the inner table just repeats the same row over twice - it's just the first row repeating.
This is sorta what the table looks like in layout view:
Item Description Rate Quantity Item total
[item] [desc] [rate] [quantity] [total]
...where the price & quantity are in the inner table.
I'd have expected to see something like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$50 1
but instead I get more like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$30 4.5
...even though querying the database & previewing the inner data set based on the same input criteria show the expected result.
Has anyone else had experience like this? I have a hunch it's to do with bindings, but not sure what.
One way to get this behavior is by accidentally replacing a table-level binding with a column-level binding.
For example, define a table by dragging a data set into the report. Select the entire table (use the outline view, or select something in the table and then click on the "Table" button that pops up just below the grid.) Then go to the Binding tab. Note that the data set and column bindings are all filled in.
Now select just one field in the Detail row. On the Binding tab, note that the Data Set is blank, and no column binding is shown. Someone who is confused by this (as I was) might then edit the column's binding and specify the same Data Set that was used to create the table. If you do this you will only see a single value repeated in that column when you run the report. (I believe the overridden column is binding to a second instance of the data set, not the one the table is iterating over.)
Not sure your question can be answered withou looking at the data and the design. But it is important to note that the results you see in the dataset preview, and not neccisarly what you would see if the query was run fully. I have seen difference with 7 records returned. I thought as it was only 7 it would be the same on full run, but it's not. The preview is not just a top 500 query, it has some other (not sure what) filters also.
To problem solve if it is your query or your binding.
If you are using a SQL database. Run the SQL in a SSMS query and see if you get the same results you do when run in the innner table.
Altentively, create a new test report, copy over your dataset and use with a stand alone table.
I think I sorted it, & this is the most bizarre thing: On the child table I'd been deleting the header & footer row & just leaving the detail row in, in the layout view. Last thing today, just before I was going to go home, I tried again - deleted the table for about the 70th time that day, replaced it, re-did the parameter bindings all exactly as before, but this time I left the header row & footer intact. Clicked the preview tab, voila, all shows up correctly. So, since I didn't need the header or footer on the child table, I went into properties, clicked Hide this element, preview again - all good. No difference to the data bindings, no difference to mappings or anything else, no change to the data sets - the only difference was leaving the header & footer in place but hidden.
Contemplating making a bug report, tbh.

Is it possible to create a row that spans all columns of a Matrix in SSRS 2008?

Is it possible to have add a row to an SSRS 2008 Matrix that spans all of the matrix's columns?
This crude diagram shows roughly what I'm looking for:
The basic idea is that each line item is a person, and each column is a field in a form for that person. The fields themselves are dynamic (and implemented as column groups on the matrix). Additional column groups are included to append non-dynamic form fields, like the time the record was entered and who entered it. Under each person's record is a comments field, which should span all of the form fields above it.
At the moment I have the matrix embedded in another tablix, with the name and fields in the matrix and the comments in the parent tablix. This works for the data (each instance of the matrix ends up being one row), but the header repeats too often (once per person) because it's attached to the matrix. The only thought I have as to how to fix this is to create another matrix in the parent tablix with the same grouping and use it to display the headers... But this will require quite a lot of manual synchronization to keep the two matrices the same.
Edit: The key problem here is making the second row span multiple column groups.
Here's what you can do:
Select the column grouping you want to add above and right click and select
Add Group... Parent Group...
Group the column by something that will not aggregate the data. You'll have to select a field from your dataset to group by so that it creates an overlapping column grouping.
Check the Add group header box
You should now see something similar to this:
Now you just need to move the Value1 field and it's header over under the new column to the right beyond the matrix dividers. Once that's done, simply delete the ungrouped column where you just copied Value1 from and be sure to select Delete columns only checkbox.
Your finished product should look like this:
It is possible - And the above answers are partial answers leaving out one key step: Merging the cells of the child row.
First, right click on your grouped row, then select Insert Row -> Inside Group - Below and you will get two rows with the cells aligning on the columns
Second, ctrl click all the cells in your new row (ie row without the data) then right click on one of the highlighted cells, and then select Merge Cells.
Now you have the table you like. To add a value to the new row: first right click your new (multi column) cell,select Create Placeholder, and then add the dataset item you desire to the placeholder.
[Edit]
After several attempts, I'm going to say this isn't possible in SSRS. The best I could come up with is a group footer that spans columns 1,2, and 3, but not the User column.
[Original Response]
I recently did something similar to this.
First, what tool are you using to create SSRS reports? (I used SQL Server Business Intelligence Development Studio)
You'll want to create a row group (grouped on Person)
Append a row to your table in "Design" view (Right click, "Insert Row --> Inside Group - Below").
Add an expression to the row that pulls the value for your "Comment" column (=Fields!Comment.Value).
Let me know if that helps...
Try adding in you column group "header" with a grouping expression of (1=1). Then a detail field will need to be defined. If you define the other group with correct data then the "header" will stretch across all details columns. You may need to merger depending on other options.
The easiest way to do this is to create a Tablix with only one column, and your row grouping.
Then, you create two rows inside this group.
In the first row inside the group, you insert a Matrix, wich you can then subgroup as you prefer.
I just had a similar problem, and this was my solution.
I banged my head against the wall for a lot of time, until i realized the solution to my problem wasn't "making a cell span multiple column groups", but "making a cell split into multiple column groups".
You can accomplish the goal by using a subreport for each person. The subreport will receive the employee id and create the hierarchy for you. Make sure your subreport column widths match the widths of the parent report.