Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I really enjoy your site. You have a lot of helpful and friendly experts who contribute so willingly. Thank you for past (and future) technical advice..."

Geography

Where in the world do Tek-Tips members come from?
OLAPMike (MIS)
10 Aug 10 13:53
I am new to SRS and I am converting some Crystal reports over to SRS.  In Crystal it is easy to create with reports with subreports that have a Header/Detail layout, in other words, for each record in the main report (header) the subreport detail lines display directly underneath.  When I am creating subreports in SRS, I am getting all of the header records together and below that I get all of the subreport records together.  How can I get SRS to to process the subreport like Crystal?

Example
Crystal Format:

Header Record 1
    Detail Record 1
    Detail Record 2
    Detail Record 3

Header Record 2
    Detail Record 4
    Detail Record 5

SRS Format I am getting;

Header Record 1
Header Record 2
    Detail Record 1
    Detail Record 2
    Detail Record 3
    Detail Record 4
    Detail Record 5

I am sure it something simple but extensive google searching yielded no hits.  Thx.
RiverGuy (Programmer)
10 Aug 10 14:03
You don't need a subreport for that.  Just add a group to your tablix with a group header.
OLAPMike (MIS)
10 Aug 10 14:19
I don't think that would work.  The header records and detail records come from separate tables.  The detail records must be queried based on the data in the header record.  I cant get all the records (both header and detail) in one query without resorting to a convoluted union query or crosstab.
RiverGuy (Programmer)
10 Aug 10 14:46
One thing I liked about Crystal Reports was the On-Demand subreports -- running a subreport within the same page at runtime.  SSRS does not have the same functionality, although it is possible to link over to other reports.  Because of this, I have tended to stay away from subreports within SSRS.  It's simply more convenient to either bring all of the data into one DatSet for a particular tablix, or link over to another report.

That being said, if you need to use a subreport, it looks like you are embedding your subreports into the incorrect section.  Based on your example, it looks like you are showing your main rows first, and then your subreport.  It's difficult to offer specific advice without seeing the RDL, but you should probably add a new line within the same context of your Header rows -- whether that's in a group or details.  Then, in this new line, embed your subreport, while being sure to link the parameters of your subreport to your DataSet fields.

Assuming your Tablix has no groupings, and your Header records are coming through in the Details section of the Tablix, your design-time layout would look like this:

CODE

[Details Section Row 1]  =Fields!SomeFieldFromHeader.Value
[Details Section Row 2]  {Embed subreport here}
[Total Row]
rpt2ssrs (Programmer)
18 Aug 10 11:23
You may try Crystal Migration Services to convert rpt to rdl. It is currently free.

http://www.crystalmigrater.com/Default.aspx

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close