How can i get 2 or more SSRS tablix reasons to display on the same page including page breaks - ssrs-2008

im building a report that has multiple tablix in it and i am grouping each one by name. i want to display each table, grouped by the name so that all of the tables for a particular name are on the same page. for example on the first page of the report i should have something like:
name
address
city
bob
123 main st
los angeles
name
hobbies
age
bob
fishing
44
name
net worth
salary
bob
$2,400,000
$78,000
and then the second page of the report should have something like:
name
hobbies
age
felicia
54 gordon ct
atlanta
name
hobbies
age
felicia
yoga
33
name
net worth
salary
felicia
$750,000
$224,000
where the data for each of these tables comes from either one large query or multiple queries(I've tried it both ways). I have tried multiple approaches to solve this but the one that got me the closest was creating 3 separate subreports (each grouped by name and with page breaks) and putting them all in a main report. When i do this the main report does not respect the page breaks in the subreports and instead puts all of the data for each subreport in a clump like this:
name
address
city
bob
123 main st
los angeles
felicia
54 gordon ct
atlanta
I have also tried creating 3 separate tablixes and putting them one after another with page breaks but the tables dont show up on the same page, so i end up with everything on separate pages
I've tried tinkering with group settings and also tried to use rectangles but get the same output. Can this be done in SSRS?

There are a few ways to do this but my preference would be using a single sub report.
Create a report that takes 'name' as a parameter (e.g. pName). Build the report as normal so it handles just the data that relates to the name parameter, so make sure your dataset query only returns data for the 'pName' provided. Include all three tablixes and whatever else you want.
Test the report and then..
Create another report with a dataset that contains just a distinct list of the names you want to report on.
Add a tablix (table of list) to the report and set it's dataset to be the dataset containing the list of distinct names. This will generate one row per name. Inside the first textbox in the tablix, you need to insert a subreport. Go to the subreport properties, select the report you created at the start of this. In the subreport's parameters section set the pName parameter to the name field of the dataset.
Finally, in the rowgroups panel, go to the rowgroup properties (there will probably only a be a details row group- that's OK) and then set the pagebreak property to 'between each instance'
That should do it.

Related

How to generate a page in report for each data row using SSRS

I am working on developing an SSRS report.I have a table in which student name and 6 subjects marks is stored in each row. My problem statement goes like this ---> lets say if 10 rows of data is present in table then I want to create report card/ marksheet for each student in new page but inside a same report. (I.e. 10 pages in one report). Then convert the report containing 10 pages to PDF format and save it in some folder.
Can anyone show some possibilities to achieve my problem statement.
Thanks in advance....
Usually you'll want to use a List object to separate your report by student. You would group the list by student in your report. Then set a Page Break in the List with the location to Between each group so that it separates each student into a separate page.
Then you can put charts, tables and other object inside the list and it will repeat with the list group (in your case, each student).
MSDN: Lists
In this report I made below, the List is highlighted in Red and groups by each site. It just has a table inside. When it's run each site gets it's own page with a list of their people.
Keep in mind that a List is actually just a Tablix with only one data cell - with the column and row headers removed.

Display one Column as Multiple Columns

I have Table Structure Like
I am Using Visual Studio 2013 and Crystal Report 13.0.12
You could use a Cross Tab for this, but you'll get more freedom by not using one:
In your report, group by Customer Name, then by TestName. Suppress all 5 of these sections except for the Group Footer of Customer Name. Here, place Customer Name, Result, and a new formula named Sugar. And inside sugar put this code:
PREVIOUS({Result})
Assuming there's no other TestNames besides Protein and Sugar, and assuming every Customer has one value for each, you should get the desired results in the footer. Let me know if that's the case and I can update the answer to accommodate.

Diaply Header Name in all the pages in SSRS

I am working on a report where i gropued the date based on Employee_ID, and my report should fetch the details of the report based on Employee_ID.
Inside my report i have 4 parameters like Employe_name which is drop
down field and multiselect value.
AsoFDate parameter, which is text field. and two more parameters.
i have selected two values from employee_name parameter, for example i selected ram and rahul two employees from employee_name parameter, my report has to fetch the details of ram and rahul based on their Eid.
on page one details of ram, and on page 2 details of rahul. upto here it is working fine fine for me. Now i need to display the names of the employee at top of report.
For example if am fetching the results of ram, my report has to show the deatils of Ram like this
Ram
DepatID Designation salary
1 Programmer 20k
then when i move on to next page, it should fetch rahul details like
Rahul
DepatID Designation salary
1 Programmer 20k
2 programmer 45K
i am able to display the details, but not the employee_names Ram and Rahul at the top of corresponding report.
Yes i sorted out this issue, i placed employee_name parameter inside the table tablix. Now am able to get the desired outcome.

Crystal Reports XI Cross tab summarised field how to stop cell rows of the same value merging?

I have created a cross tab however if I have a firstname field it merges the rows together if there are two names which are the same. How do you get it to display the names in the each row. In the example below Sarah is not displayed twice as the cells are merged together.
Firstname Lastname
Judy Collins
Sarah Dane
Smith
Joe Dine
Mary Lane
It sounds like you grouped your crosstab on the first name only. I would recommend:
Make a new Formula (Call it "FullName")
In the formula, combine the first name and last name, e.g. something like {First Name}&{Last Name}
Edit your crosstab to group by the FullName formula instead.
Does this help?
EDIT
Based on your comment, I don't think your comment is with Crystal. You need a "unique ID" of some sort, a distinct number for each person. My original suggestion was trying to use the user's full name as a unique ID, but that won't work if your dataset is big enough to include multiple people with the same name. Does your dataset have any kind of unique ID? What is this crosstab trying to display? There might be a better way.

Flatten data inside a crystal report

Ok, this might be a weird request, but is it possible to essentially flatten my dataset inside a crystal report?
I have a datatable in C# that was created with a join, so when it hits the report its 2 records. Most of the columns have identical data, with the last few displaying a different address.
Instead of printing the detail section multiple times with mostly similar data, I need to display 1 'record' with the common data printed once, and each records address arranged next it. As in, all the common fields displayed in one area, and then next to that the address fields from the record where 'AddressType = 1', then next to that the address fields where 'AddressType = 2'
Is this a subreport thing? Because even with subreports I can't get it to only print 1 detail section with the data from just the first record.
Is this even possible with crystal? For long drawn out reasons, I can't flatten the data before it gets to the report.
Ok, someone here in the office showed me the way, so I'll put this out there.
Given data with cols A,B,C all common and D,E different across multiple rows, this is how I 'flattened' the dataset in crystal:
Create a group based on col A, and put A,B,C inside that group header - get rid of the details section entirely
Create a subreport in the group header for each row of data, in my case 2 subreports
Inside each subreport, put fields D,E. Important: There are NO links for these subreports!
For each subreport go into the Select Expert and create a condition that shows only 1 particular row of data. This conditional will have the same field for each subreport, but different values. In my case it was AddressType='A', and AddressType='B'
This will produce 1 report, with A,B,C listed once, and D,E listed once for each subreport(once for each row of data)
This was confusing, time consuming, and I hate crystal reports now more than ever.
It would be pretty ugly, but you could add a group for each common field in Group Expert and then display the data for the common fields in the last group header. So if your common fields are field1 through field5, you would create five groups and put all five fields in the group header of field5. Then you would put the unique address fields (call them field field6 through field8) in the details section.
Now the trick is getting everything to line up correctly. You can set "underlay following sections" on the group header for field5; this will cause field1 through field5 to "fall down" into the details section. You just need to make sure that field6 through field8 are all to the right of field1 through field5 so the text does not overlap.
Now, if you want the two address records to print horizontally, I think you will need a subreport with multiple columns for that. But the same principle applies -- just make sure the subreport is to the right of field1 through field5 so the data doesn't overlap.
Have you tried the suppress if duplicated option on each non-address field?
Otherwise, you could group by the common id, put the common fields in that header, and then display the multiple addresses in the details section.
Or, you could remove the addresses from the datasource and use a subreport to fetch this data for each record. This would bypass the join and be the slowest option performance wise, due to having to select the addresses for each record.
Ok, firstly let's see if I understand this right :
You want a report that would be in the format
MainDetails Address(type1)
MainDetails Address(type2)
to instead be in the format
MainDetails Address(type1) Address(type2)
?
Assuming there are only two address types, you can do the following :
1) Group by Main details (whatever the unique entry is
2) Put the address details in the group header next to them, on the right
3) Also put the address details in the details section, but positioned as if they were in the Address(type2) column positions, so it looks like :
GH MainDetails Address
D.......................................Address
4) Next, add a sort to the report on the AddressType field, so that AddressType=1 shows first.
5) Add a conditional suppression formula to the Details section saying {AddressType=1}
6) Using the Section Expert, in the Group Header tick the 'underlay following sections' box
This should work as long as the number of addresses is either 1 or 2.