Hi,
I want to create a report that has two different sections which takes different columns from an unique grid.
It fetches the data from a parent grid and I fetch the desired columns with initializelayout of the child grid, then at the event of a click of the button I create my report with the print settings and my section and export it using UlltraGridDocumentExporter.
I thought I could create two different sections, but exporter only gives me the first and not the second.
I also ask if it is possible to rotate (perhaps using the report rotator or another solution) my grid to create a double-sided A6 sheet
I hope I have been thorough in my question and I apologize if I misspelled but English isn't my first language
Hello Ca,
I have been investigating into the behavior you are referring to, and it is possible to export your grid objects to different sections using the UltraGridDocumentExporter. There is an overload to the Export method that takes an ISection, and so if you were to create your report first, and then add a section to it, you could then export to that particular section, like so:
Report report = new Report(); var section1 = report.AddSection(); var section2 = report.AddSection(); ultraGridDocumentExporter1.Export(ultraGrid1, section1); ultraGridDocumentExporter1.Export(ultraGrid2, section2);
Regarding the “A6” sheet, I am not familiar with that type of Report, but it sounds like you are looking to be able to rotate the grid on the back of the page. I am not sure the IRotator will help you here, but since you have mentioned in another forum thread that you are getting a unique set of columns, I would recommend reorganizing those columns in your UltraGridBand such that they are essentially reversed.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
It's important to note that the UltraGridDocumentExporter assumes that the section it's exporting into is dedicated to the grid. If the grid is wider than the page, the UltraGridDocumentExporter will adjust the width of the section so that all of the columns in the grid fit on one page horizontally. So you should never export 2 grids to the same section. And if you have other content to include in the report, it should probably go into it's own section apart from the grid's sections.