Howto add programmatically a frame control to a section

Posted by: thorsten on 4 August 2017, 2:33 pm EST

  • Posted 4 August 2017, 2:33 pm EST

    Hi,

    I want to add programmatically a frame control to a section. Normaly I add controls to a section with the command 'mySection.Controls.Add("DDActiveReport2.Label")'. When executing this command everthing works fine. When adding a frame control it also will be added to the section. But when adding controls programmatically to the first pane of the frame, the controls will be invisible in the AR designer. I can select them and change properties. When printing the report the controls are visible.
    When adding controls in the AR designer, they will not be added to the frame.
    In the attachment you will find a sample which descripes my problem.

    Best regards,
    Thorsten Blawatt

  • Replied 4 August 2017, 2:33 pm EST

    No answer?
  • Replied 4 August 2017, 2:33 pm EST

    First, make sure your using a version of Active Reports that is greater than Version 1253. 

    Second, realize that frames are a touchy, difficult to use control that I would avoid if at all possible, PARTICULARILY when adding elements programmatically. 

    For example, you can not access the Pane information programmatically.  These can't be managed through code, which will likely be your next question.  Only the frame itself can.  You can see inside of the Panes but you can't actually manipulate them with code.

    (DD, do correct me if I'm wrong about that part...)

    I've seen the results you are speaking of when adding controls to a frame in versions of the software previous to Version 1253 and this is fixed, I believe.  I saw the problem when adding subreports to a frame programmatically.

    D.
  • Replied 4 August 2017, 2:33 pm EST

    After installing the patch, the text of labels and datafields will shown, but the border is still missing.

    In the attachment you will find a sample which descripes the problem.


    2005/03/Add Frame Programmatically.zip
  • Replied 4 August 2017, 2:33 pm EST

    Dear DD,

    you have made no reply to this problem? Could you reproduce this problem?

    Best regards,
    Thorsten Blawatt
Need extra support?

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

Learn More

Forum Channels