Hello,
I have a grid bound to a hierarchical BindingList<T> this object generally is 4 levels deep, but can vary. When I perform a print using the ultragrid printpreview and print methods, I get all rows in an expanded state, but no row summaries below the second band level.
I am using 2 custom sort object using this ICustomSummaryCalculator interface, and all summaries are generated correctly in the screen layout. The first ICustomSummaryCalculator is only added to the first parent band, and the second ICustomSummaryCalculator is added to every other band in the grid.
I also notice that when a row is expanded the the summary is generated. Does this maybe have something to do with the printlayout having all rows expanded, while the screen layout does not..thus all of the child band summaries are not generated. Here is a conflicting statement....when I have all rows in the grid expanded (screen layout), and I print, the summaries still do not appear.
I do have some code in the initialize row event subscription to collapse or expand rows in the printlayout, based on the expansion state of the screen layout. but even with this code removed, the summaries are still not printing.
Thanks for any light you can shed.
Best Regards,
Gerald
Hi Gerald,
This sounds like a bug to me.
What version of the grid are you using? You may need to get the latest service release or update to the latest version.
How to get the latest service release - Infragistics Community
If that doesn't help, then perhaps you could post a small sample project here demonstrating the issue so we could check it out.
Hi Mike, I am using version 2010.2
Here is a sample project, there is alot of commented code as this is a copy from a project I am currently working on.
Many Thanks,
Hi Mike,
See the screenshot of my print preview, as you can see, the summaries are not appearing. No you do not need to actually print, the effect can be seen in the print preview.
The same problem exists with the excel export.
Thanks,
Okay, so you are talking about the summaries on the child data. The summaries on the root level are showing up correctly.
I looked at this sample for a while, but I can't see any reason why this should not be working. The sample is pretty complex, though and there is a lot going on. It might help if you could simplify it. I doubt that the ICustomSummaryCalculator has anything to do with it. I tried changing one of the summaries from Custom to Count and that didn't make any difference, it still didn't display in the print preview.
I'm going to ask Infragistics Developer Support to create a case for you and enter this as a bug for developer review. I find it hard to beleive that this is an actual bug, since it's such simple functionality, but it's going to take a much more thorough investigation to find out what's going here.
Thanks so much for all your prompt responses. I will patiently await a resolution from your developers.
In the meantime, since I had to deliver a solution, I was able to overcome this issue by adding a new row to each of the levels in the hierarchy, with the summaries calculated by me.
Since I don't allow sorting on any child bands, these rows remain at the bottom or each row group, I've also styled this particular row to "look" like a summary row.
Thanks a million,
Hello Gerald,
As a test, I commented out the code in the BeforeRowExpanded event handler. Running the project with that code commented out got rid of the issue of the child summaries not displaying. I'm not sure which line of code in there is causing the issue, though. As it turns out, that event is fired when the rows are expanded before the grid is printed as well as when the rows are expanded on the form.
Hi Dave,
I also commented out the code in the BeforeRowExpanded event handler (lines 1356 to 1388), and that made no difference. I also commented out the code in the BeforeRowColapsed (lines 1395 to 1415) as well, with no difference.
I have submitted this as a development issue and created a support case in order to provide you with more information.