10

Having some trouble getting this to work... I basically want the report to look similar to:

enter image description here

The way I remember doing this in the past was by creating "page groups" in the report wizard. However, I believe that was in VS05, and now the report wizard is very different in VS10. It now has column groups and row groups but no page groups, and I can't see how to get this to work without the wizard either. If tried looking for a tutorial or example but haven't had much luck. Also, the site 'gotreportviewer.com' is pretty terrible and has not been much help.

matthew_360
  • 5,901
  • 9
  • 32
  • 40
  • 1
    Did they bring in rs for vs2010? I thought you were supposed to use visual studio 2008 for producing reports. – JonH Dec 05 '11 at 18:23
  • well... not entirely sure what you mean, but I am using VS10 now and have some simple reports up and running using the MSFT reportviewer control... – matthew_360 Dec 05 '11 at 18:25
  • I dont think they have "Business Intelligence Projects" within visual studio 2010. – JonH Dec 05 '11 at 18:25
  • See this http://stackoverflow.com/questions/2931766/missing-business-intelligence-project-type-in-visual-studio-2010 – JonH Dec 05 '11 at 18:26
  • interesting... so, the answer is to get ahold of a copy of vs08 or vs05 to create the reports in? that's... dissapointing. – matthew_360 Dec 05 '11 at 18:27
  • I dont know what to tell you, I just checked for updates and apparently there is an update for visual studio 2010 Service Pack 1, so I am downloading that - maybe you are running that already? – JonH Dec 05 '11 at 18:28
  • does it matter what type of project it is? in the past I did this in a regular asp.net web application. – matthew_360 Dec 05 '11 at 18:28
  • Im not sure what you mean, when I develop a solution I create a solution project, within the solution is the project, that project consists of reports that can be deployed to a report server. Are you using reporting services? If so how do you initially create a report without a project without a solution? – JonH Dec 05 '11 at 18:29
  • my solution only has 1 project. In which I'm just creating an RDLC, and pointing to that from a reportviewer control on one of my pages. Sorry, I had conflated the terms project and solution. – matthew_360 Dec 05 '11 at 18:33
  • Right that means you are merely using a winform or internet application but not a real business intelligence solution. So basically you "Add an item" by right clicking your project and selecting a .rdl file. Thats a bit different then a report project. A report project is a folder - have you - that is similar to say a win form project. It then allows you to create your project's reports which could be one or many reports. The entire report project can then be easily deployed to your report server. I think that is why you can build a report in vs2010, that hasn't gone away. – JonH Dec 05 '11 at 18:35
  • I should have stated more explicitly that I am using RDLCs - local reports. Anyways, my original question still stands. – matthew_360 Dec 05 '11 at 18:40
  • no problem i will answer now... – JonH Dec 05 '11 at 18:42

1 Answers1

24

To create the effect of one record per page means you need to set a group element to the report. For instance assume you have a database table called "Login" and you wanted to group by a person's login name. Here is what you do:

First add a table to the report like so:

enter image description here

The table can be found in the "Toolbox" on the left hand side of VS2010. Once the table is added you will want to add a group to this table:

enter image description here

After this you will want to go to the properties of the group:

enter image description here

Here you simply can set a page break between each instance of a group, in addition, this will give you a "one record per page".

JonH
  • 32,732
  • 12
  • 87
  • 145
  • holy Awesome Answer! thanks a lot! going to try it out now... (as soon as the VS10 Service pack finishes) – matthew_360 Dec 05 '11 at 18:49
  • 2
    that's... kind of what I wanted. Thank you for helping me, making reports is the worst. – matthew_360 Dec 05 '11 at 19:24
  • 1
    O come on, making reports is really really fun stuff :). You get to design, program, and train all at once. – JonH Dec 05 '11 at 19:25
  • 1
    so... what if I wanted the expression that the data is being grouped by to appear outside of the table like in the example? (I guess I dislike creating reports so much because I've found very little in the way of useful examples or tutorials) – matthew_360 Dec 05 '11 at 19:34
  • 1
    @matthew_360 - just because I put the label "Login" in the group by doesn't mean you have to put it there - I put it there as an example. You can add it to the details section of the report. And also you don't even have to use a table, I used it only to show an example. – JonH Dec 05 '11 at 19:36
  • Also see here: http://stackoverflow.com/questions/4600252/c-sharp-microsoft-reporting-winforms-rdlc-how-to-add-detail-sections-in-body – mklein Nov 17 '13 at 19:27
  • According to msdn, page break doesn't work with column groups. – Arman Feb 06 '16 at 10:54
  • @JonH Yes I sure did, I just came up here trying to do the same thing with column groups and failed. I wonder if there is a workaround for this. I need that feature badly... – Arman Feb 06 '16 at 18:44
  • @JonH how do I do same in vs 2008? – Smith Aug 07 '16 at 13:37
  • @matthew_360 You say you don't have to use a table, but every example I see to create 1 record per page uses a table and requires grouping. Well, as far as I can see, you cannot create a grouping unless you have a table on the design surface. – Del Lee Feb 14 '18 at 16:04