Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Create a report from ultragrid with 2 section distinct
posted

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

 

Parents
No Data
Reply
  • 34810
    Offline posted

    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.

Children