How to remove Scrollbars from parameter window in AX2012?
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
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); } } } }
This worked for me. Thank you.
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.
Dear Vilmos Kintera,
Can you explain more, I am getting this error "error executing code: FormBuildGroupControl object does not have method 'scrollbars'."
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.
Facing this error at run time :
error executing code: FormBuildGroupControl object does not have method 'scrollbars'.
Yes I am using contract, Builder and RDP classes for the report.
Hello,
are you using a contract class?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156