x
ActiveReportsJS v5.2 is Here! Check out our newest update. ActiveReportsJS v5.2 is Here! ARJS 5.2 is Here!

Difficulty getting controls to appear when added to report from the code

Posted by: jnissen on 3 February 2025, 6:55 pm EST

    • Post Options:
    • Link

    Posted 3 February 2025, 6:55 pm EST

    Hi,

    For one of our reports we give the users a screen to select what specific fields they want displayed as well as other options like groupings, sort order etc. I am attempting to build out the report through the code side of things as making a report in the designer that conforms to all the possibilities would be overly complicated. For the most part I have been able to things like the header/footer to display with text boxes but when I’ve tried to add a BandedList, or subsequently a BandedListGroup nothing displays in the report when generated. For example:

    [code]bandedList.Details = New PageReportModel.Band()

    bandedList.Details.Name = “bandedList Details”

    bandedList.Details.CanGrow = True

    bandedList.Top = “0.2in”

    bandedList.Left = “0in”

    bandedList.Width = “10in”

    'bunch of code to build the text boxes to go in the details area

    bandedList.Details.ReportItems.Add(textBox)

    pageReport.Report.Body.ReportItems.Add(bandedlist)[/code]

    When using code such as this, setting the BandedList basic properties, building a handful of TextBox items and adding them to the bandedList.Details.ReportItems collection, and then adding the BandedList itself to the pageReport.Report.Body.ReportItems collection I see nothing in the report when I test it. If I simply just add the textboxes directly the pageReport ReportItems then all them show up no problem.

    I even tried following along with one of the example projects they have on GitHub where you build out a table with some data and get the same results. If the text is added to a table object and then added to the report I see nothing, but when I add just the text directly it always appears.

    I have a feeling that I am missing something in the process for using something more complicated than a simple TextBox but I have been unable to figure it out. The documentation for the code side of generating reports seems to be pretty sparse, most pages seem to have you go look at examples where nothing is explained and still doesn’t work for me when I’m copying what the example does.

    Thank you,

    Joseph

  • Posted 4 February 2025, 1:26 am EST

    Hi Joseph,

    The issue seems to be unclear to me. Can you please share with us your sample application replicating the issue and steps to replicate the same so that we may assist you further?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels