Are things being done "The right way"?

  • lsirac 3 months, 4 weeks ago

    I’d like to know if I should re do my reports, as I don’t know if they are done “the right way”.

    Right now, I have ~50 different Section Reports (done in VS). Inside my section reports, I have ~10 headers and footers, each containing a sub report. In the sub reports, I create graphs and other things at run time (not using the designer, as the sub reports are also Section Reports). This feels like the wrong way to do things, as my designer tab is filled with headers/footers and it’s hard to understand whats going on. Is this the correct way of creating the reports or is there a better alternative?

    Also, amongst reports there are similar information (i.e. the header should be the same across every page of each of the 50 reports, but I need to do that manually). Is there any way to do put the header somewhere once, and include it in all my reports?

    If I use a Page Report, there’s no option for a header. Why’s that?

    And finally, can I have a sub report of any type? I.e. can I have a Page Report as a sub report in my Section Report?

    Thanks in advance!

  • 12p
    Ruchir Agarwal12p 3 months, 3 weeks ago

    Hello,

    1. Having ~50 SectionReports with Header/Footer looks too much but whether there is a better solution depends on the use case and your report. Hence, we request you to provide some information on what you are trying to achieve.

    2. For having the same Header/Footer in multiple reports, you need to use Code Based SectionReport and add the same header/footer to the report in which you want to have same Header/Footer.
    I have attached a sample application “prj_PageReportInSectionReport”creating two SectionReport with same Header,Footer.

    3. ActiveReports PageReport does not provide Header/Footer section because in PageReport the layout is defined for a Page itself i.e., whatever you place on a page of PageReport is rendered on that page only.

    4. For having a PageReport in SectionReport, you may export the PageReport to RDF format and load this in SubReport inside main report. For complete implementation please refer to the sample attached “prj_PageReportAsSubReport”.
    For following this approach you will need to add “GrapeCity.ActiveReports.Export.Rdf.v11″ dll to your application.

    Regards
    Ruchir Agarwal

  • lsirac 3 months, 3 weeks ago

    1. ~50 is an exaggeration. I have closer to 10 headers and 10 footers, but my designer page looks really cluttered.
    Use case is each report is about 20 pages, has graphs/data etc. When a customer wants to create a report, the graphs and data are created using the customers data (every customer is different, so the queries are done based on the customer).

    Is there a better solution in this case?

  • 12p
    Ruchir Agarwal12p 3 months, 3 weeks ago

    Hello

    Thank you for sharing information.
    However, I would need answer to some more questions to suggest an alternative to you.
    1. As you mentioned you have 10 Header/Footers in your report,so does your data really needs to be grouped up to 10 levels! Or is there something else for which you have used so many headers in a single report?
    2. Why have you placed SubReport in the header instead of Detail section of the report.

    Also, it would be really helpful if you could share an image, etc of how you are willing to show data in your report (i.e., layout of the report)

    Regards
    Ruchir Agarwal

  • lsirac 3 months, 3 weeks ago

    I too wonder why everything was placed in headers/footers instead of the detail section. I’m not the one who did this, the dev who did is no longer here unfortunately.

    For the report, the information is sensitive. However, our reports are rather simple. Each page contains its own chart (bar graph/pie chart), which requires its own data set. This data set needs to change based on which customer is trying to generate the reports.

    I think the way we’re doing it right now is bad (Section reports with everything created using c# and not the designer, 10 headers/footers per report, each containing a subreport that is a graph) so if we want to redo it I see two viable options:

    1) Redo the reports using RDL reports, using a sub RDL report for every graph as well as a master RDL report for the footer. Then apply the data set based on the customer at run time.

    2) Reuse our Section reports code, but put everything in the detail section in the designer so it’s easier to manage.

    Thoughts?

  • 12p
    Ruchir Agarwal12p 3 months, 3 weeks ago

    Hello,

    You may meet your requirement using both the reports. However, using SectionReports looks more suitable because of the following advantages:

    1. If you want to have DataSource specific to only one customer at a time, then SectionReports allows modifying DataSource at run time (compared to RDL report that are famous for allowing multiple DataSource).
    2. It also offers the PageFooter section, where you may put the common data required in all pages of your report.
    3. Also, the Chart control in SectionReport has much more features than the Chart in RDL report.
    4. SectionReport allows more and easier modification of the report due to various events available in it.
    With SectionReport you can achieve your requirement using a single report.

    For implementing this approach, place Chart control(s) in Detail section, modify the Report’s DataSource at run time as per the customer and then bind the chart(s) to the relevant dataset.
    For modifying a SectionReport’s DataSource at runtime, please refer to the following Documentation link:

    http://arhelp.grapecity.com/webhelp/AR11/index.html#Modify%20Data%20Sources%20at%20Run%20Time.html

    Let me know if you need any further help.

    Regards
    Ruchir Agarwal

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.