Problems with big Repots

  • DirkHeinze 2 months ago

    If I create a page report and add many elements by code to the report, I got an exception if the report becomes very large.
    Errormsg: “A report cannot bigger than 170 inch”
    Is there a way to avoid this error or to configure the max size of a report?

    Regarding,
    Dirk

  • 12p
    Ruchir Agarwal12p 2 months ago

    Hi Dirk,

    As the error message says, in ActiveReports the limit to a report height is 160 inch.
    Also, we are discussing any possible workarounds for this case.
    I will update once we have a solution.

    Regards
    Ruchir Agarwal

  • 12p
    Ruchir Agarwal12p 2 months ago

    Hello Dirk,

    Though, we are still discussing on this case {Tracking id: 166763}. But for the meanwhile a possible workaround could be dividing of one big report to several subreports.

    Let me know if this does not help you and you further need any help.

    Thanks
    Ruchir Agarwal

  • DirkHeinze 1 month, 4 weeks ago

    Hello Ruchir,

    I tried to split the report in several subreports. But my problem is, I create the report completely from code.
    So I create an instance of a PageReport and add report item by report item to the report.
    Therefore I must define the position of every new report item. (Also subreports)
    If I do that, I will rum out of the limits.

    Maybe I have a wrong implementation to add subreports to my report. I u want, I can post the code and maybe we find a another way of implementation.

    Regarding,
    Dirk

  • DirkHeinze 1 month, 4 weeks ago

    Here is a simple code example. Like I add subreport to my report body

    FileInfo fInfo = new FileInfo(subReportFile);
    PageReport pageReport = new PageReport(fInfo);
    // Get the the item height of the subreport
    Length length = pageReport.Report.Body.Height;
    pageReport.Dispose();
    Subreport subreport = new Subreport();
    subreport.Height = length;
    report.Report.Body.Height += topItem.Height + distLength;
    foreach (ReportItem item in report.Report.Body.ReportItems)
    {
    Length itemEnd = item.Top + item.Height;
    if (topItem.Top < itemEnd) topItem.Top = itemEnd; } subreport.ZIndex = report.Report.Body.ReportItems.Count + 1; report.Report.Body.ReportItems.Add(subreport); [/code] Hope this helps. Regarding, Dirk

  • DirkHeinze 1 month, 4 weeks ago

    Sry for bad formatting, but the csharp code tag seems not working for me.

  • 189p
    AbdiasM189p 1 month, 3 weeks ago

    Okay. In that case, we’ll have to wait for update from the concerned team. We’ll let you know of the developments on this issue.

  • DirkHeinze 1 month, 3 weeks ago

    Ok, thanks for the reply.
    But is there no other way or workaround to add supreports by code.
    The exception is throwing by the “item.Top” property. But currently I know no other way to add supreports, because if I don’t set the “item.Top” property, all sureport will printed at the same position and then they overlap to each other.

    Regards,
    Dirk

  • 12p
    Ruchir Agarwal12p 1 month, 2 weeks ago

    Hi Dirk,

    Though, there are no direct ways like SectionReport to combine PageReports, but still there is a workaround that you may use for meeting your requirement:
    Workaround: Second PageReport can be added in the first PageReport and that way merging can be achieved in PageReport.
    I have attached a sample application combining two Page Reports for your reference.

    Let me know if you face any troubles implementing the same.

    Regards
    Ruchir Agarwal

  • DirkHeinze 1 month, 2 weeks ago

    Thank you for the example.
    I would try to implement this in our solution, but before I had two questions.

    1. Is there is any timeline for the issue ’166763′ itself. Because if there is a possibility for you to fix that issue in the next 2 month, it doesn’t make sense for us to change our implementation.

    2. If I change our implementation to merge reports, are there any limitations our side effects like limited count of reports to merge or anything else known?

    Regards
    Dirk

  • 12p
    Ruchir Agarwal12p 1 month, 2 weeks ago

    Hello Dirk,

    1. I have asked for a confirmation on the fix and will update you once I receive any information.
    2. There are no as such hard-coded limitation for the maximum number of SubReports that can be in a single report. Hence I suggest you to go ahead and try implementing the workaround with your report.
    Let me know if you get stuck anywhere while implementing the workaround.

    Regards
    Ruchir Agarwal

  • DirkHeinze 1 month, 1 week ago

    Hello Ruchir,

    I have a question about the implementation. I thought there is a second page report added to the first page report. But for me looks like a subreport which will be added to the page report.

    private void Form1_Load(object sender, EventArgs e)
            {
                ClsPageReport _Obj = new ClsPageReport();
                ClsPageReport _Obj2 = new ClsPageReport();
                GrapeCity.ActiveReports.PageReport _pageReport = new GrapeCity.ActiveReports.PageReport();
                _pageReport = _Obj.CreateReport();
    
                //Change the path here
                string str =  System.IO.Path.GetFullPath(@\"..\\..\\Page_SubReport.rdlx\");
    
                GrapeCity.ActiveReports.PageReportModel.Subreport subreport = new GrapeCity.ActiveReports.PageReportModel.Subreport();
                subreport.ReportName = str;
                _pageReport.Report.Body.ReportItems.Add(subreport);
    
                GrapeCity.ActiveReports.Document.PageDocument runtime = new GrapeCity.ActiveReports.Document.PageDocument(_pageReport);
                viewer1.LoadDocument(runtime);
    
    
            }

    The second page report ‘_Obj2 ‘ is not used.

  • 12p
    Ruchir Agarwal12p 1 month, 1 week ago

    Hi Dirk,

    In this approach, we are creating a PageReport using “ClsPageReport” and adding a SubReport to it.
    Yes, you need not use “_Obj2″ and may merge your subreport without it.

    Let me know if you are having any problems meeting your desired outcome.

    Thanks
    Ruchir Agarwal

  • DirkHeinze 1 month, 1 week ago

    Hi Ruchir,

    if I try to implement like your way, the generated pdf will always overlap their report elements. (See the file attached)
    To get this working I have to define the \”ReportItem.Top\” property of the SubReport, before I add it to the main PageReport. But the \”ReportItem.Top\” property will throw the exception if the height of the main PageReport exceeded 160 inch.

    So I don\’t think that this solution will work.

    Thanks,
    Dirk

    Attachments:
    1. Subreport

      Subreport.png

  • DirkHeinze 1 month, 1 week ago

    @DirkHeinze said:

    Note: The one difference of my code to yours is, I load the main PageReport from a rdlx file and create an instance of if.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.