I am having some problems executing what I would think would just be a simple group by in a table. I have a collection of objects, say Person objects to make it easy. What I want to do is have a single table and group by the LastName with a count column with the number of people with that last name. So it would look like this
LastName Count
Smith 5
White 1
Doe 3
I have been messing around with the grouping within a table however every time I try to add a group even within my table it keeps adding the grouping record as the top row in my table above my header and then repeating the header with the data row each time.
I was able to get the data to appear in the way that I want by using the report header as the locating for a set of labels that i am treating as a table header, and then using a grouping in a report section with another set of labels containing the data grouped in the way I want to represent each row in a table.
I have run into a few problems with this: I want the data to actually look like a table and trying to get everything to match up exactly has been an exercise in futility. It would be much easier if this were possible to do with a table rather than having to create sets of labels that act as the header and table rows. Also when designing the report in this way, in order to get the print-out to look right, the PDF looks terrible -- the border of the bottom row of the report is simply gone. Also the report viewer looks different than the PDF -- I had to change the size of my items in the report designer to get the PDF and printed report width to fit within the page while the report viewer now looks like it is only taking up about 1/2 the page width.
Hi jerry hikel,
You are certainly welcome.
If you have any further questions that I may assist you with in the meantime or if you experience any issues running the attached sample, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
Thank you very much -- the items you posted in the reply are not showing up but I'll grab the attachment and test it out right away.
We are working on implementing a number of reports within a new WPF application for our users so assuming this gives us what we need we'll be able to use the platform for our reporting.
I have constructed and attached a sample that produces the behavior that you have described.
In the attached sample, I have defined a simple class, (People) with a single public property of LastName; populating a collection of people and using this as the data source of the report.
To produce the actual report, I am defining the layout of the header with two labels, one for Last Name and another for Count; I have added a group for LastName to the body of the report, neighboring a Label object which implements a count expression, (=Count()).
Report Layout:
Report Result:
Please find the attached sample which demonstrates this behavior.
If you have any further questions that I may assist you with in the meantime, please let me know.
Hi -- is there any update on this investigation?