How to dynamically modify a FlexReport (Invoice.flxr) to add fields in VS2017

Posted by: cvandien on 29 April 2019, 9:38 am EST

  • Posted 29 April 2019, 9:38 am EST

    Hello,

    Can you provide a code example (modifying prj_FlexReport that you previously provided) of how to dynamically add a SuperLabel to the .flxr report?

    At runtime, I do not know how many .HTML pages I need to display in the report… so, after doing a count of the HTML pages, add the fields (and possibly page breaks) I need to load all the HTML pages…

    The core of this is how to dynamically modify the FlexReport object.

    Thank you for your help.

    Chuck

  • Posted 30 April 2019, 6:52 am EST

    Hi Chuck,

    SuperLabel can be added to a report at run-time, as follows:

            Dim sFieldNew As New SuperLabel
            sFieldNew.Text = "<html><body>Test via code</body></html>"
            sFieldNew.Top = 2 * 1440
            sFieldNew.Left = 0
            sFieldNew.Width = 2 * 1440
            sFieldNew.AutoHeight = AutoSizeBehavior.GrowAndShrink
    
            C1FlexReport1.Sections.Header.Fields.Add(sFieldNew)
    

    I could observe an issue while setting the Text property to html text here and hence, I have escalated the same to the development team (Internal Tracking ID: 377061). Will get back to you once I receive any information.

    Best Regards,

    Esha

  • Posted 1 May 2019, 5:14 pm EST

    Awesome! Thank you!

Need extra support?

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

Learn More

Forum Channels