web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to remove remove scrollbar from parameter window.

(0) ShareShare
ReportReport
Posted on by 40

How to remove Scrollbars from parameter window in AX2012?

ParameterWindow.JPG

Cleared caches and usage data lot of time, even I have redeploy report after deleting it from Reporting Server but in vain. How can I fix that?

Thanks,

Majid 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    lennynyk Profile Picture
    55 on at
    RE: How to remove remove scrollbar from parameter window.

    Piggybacking off of Vilmos' solution, I put together this method and called it from the UIBuilder class' build method:

    // Remove the scroll bars from the parameters dialog window, by iterating through the from build design controls hierarchy
    private void removeScrollBars(str ctrlName = "", FormBuildControl _ctrl = null)
    {
        FormBuildDesign frmDesign;
        FormBuildControl ctrl;
        FormBuildGroupControl grpCtrl;
        FormBuildTabControl tbCtrl;
        FormBuildTabPageControl tbpCtrl;
    
        int i, ctrlLength;
    
        if(!_ctrl && !ctrlName)
        {
            frmDesign = this.dialog().formBuildDesign();
            ctrlLength = frmDesign.controlCount();
    
            // Iterate through the top level of the controls hierarchy
            for(i = 1; i <= ctrlLength; i++)
            {
                ctrl = frmDesign.controlNum(i);
    
                if(ctrl is FormBuildGroupControl)
                {
                    grpCtrl = frmDesign.controlNum(i);
                    ctrlName = grpCtrl.name();
    
                    if(ctrlName == "DialogContent")
                    {
                        this.removeScrollBars(ctrlName, ctrl);
                        break;
                    }
                }
            }
        }
        else if (_ctrl)
        {
            ctrlLength = _ctrl.controlCount();
    
            // Iterate through the child controls until the General Tab is found
            for(i = 1; i <= ctrlLength; i++)
            {
                ctrl = _ctrl.controlNum(i);
    
                if(ctrl is FormBuildTabControl)
                {
                    tbCtrl = ctrl;
                    ctrlName = tbCtrl.name();
    
                    if(ctrlName == "Tab")
                    {
                        // Once the Tab control is found, locate the general tab
                        this.removeScrollBars(ctrlName, ctrl);
                        break;
                    }
                }
                else if(ctrl is FormBuildTabPageControl)
                {
                    tbpCtrl = ctrl;
                    ctrlName = tbpCtrl.name();
    
                    if(ctrlName == "General")
                    {
                        // Disable the scroll bars on the general tab. This appropriately resizes the form.
                        tbpCtrl.scrollbars(false);
                        break;
                    }
                }
                else
                {
                    // Keep looking if the desired control isn't found
                    this.removeScrollBars("",ctrl);
                }
            }
        }
    }


  • lennynyk Profile Picture
    55 on at
    RE: How to remove remove scrollbar from parameter window.

    This worked for me. Thank you.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to remove remove scrollbar from parameter window.

    ControlNum refers to specific control within another container control (such as tab, formgroup, etc.) and if you just copy-paste the code, it might point to the wrong control. Thus it is better to iterate through all form controls, and check what are they, since only specific form control types have the scrollbars method available on them.

    So you need to find the correct one.

  • Shoaib Ashraf Profile Picture
    180 on at
    RE: How to remove remove scrollbar from parameter window.

    Dear Vilmos Kintera,

    Can you explain more, I am getting this error "error executing code: FormBuildGroupControl object does not have method 'scrollbars'."

  • Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to remove remove scrollbar from parameter window.

    It is because you most likely have not followed the post correctly.

    You need to iterate the form controls and find the correct one for which you can disable the scrollbar, which is either the FormBuildTabControl or FormBuildTabPageControl, and not the FormBuildGroupControl. Maybe you need to get 1 level less or more on the controls? You could always check the type of the object with the "is" keyword and compare it against the form control type I mentioned, and if it is the right one, you have found it.

  • Majid Hafeez Profile Picture
    40 on at
    RE: How to remove remove scrollbar from parameter window.

    Facing this error at run time :

    error executing code: FormBuildGroupControl object does not have method 'scrollbars'.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to remove remove scrollbar from parameter window.

    Check this:

    dynamicsaxdeveloperz.blogspot.hu/.../scrollbars-appearing-on-dynamically.html

  • Majid Hafeez Profile Picture
    40 on at
    RE: How to remove remove scrollbar from parameter window.

    Yes I am using contract, Builder and RDP classes for the report.

  • Community Member Profile Picture
    on at
    RE: How to remove remove scrollbar from parameter window.

    Hello,

    are you using a contract class?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Community Member Profile Picture

Community Member 2

#2
Mea_ Profile Picture

Mea_ 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans