Website in Role Center Parts

shahidt
shahidt Member Posts: 61
edited 2012-05-12 in NAV Three Tier
Is it possible to show a website or SSRS reports in a Role Center Part? How? Alternatively, I can also show a Page (List Part) that gets data from another SQL DB using Views, but I don't want to create a table with the same schema in NAV. I have seen LinkObjects method, but this requires me to create a table.

I did search the forum on this, but had no luck. Any input is much appreciated.

Answers

  • kine
    kine Member Posts: 12,562
    You can use addin for that... I think that there are already some usable for that... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • shahidt
    shahidt Member Posts: 61
    Hi Kine, can you please suggest some good add-ins source for NAV. I am also currently looking into designing my own.
  • kine
    kine Member Posts: 12,562
    You can try to use my UniWPF Addin and insert the
    <WebBrowser Source="http://somepage" />
    
    as an control inside the grid.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • shahidt
    shahidt Member Posts: 61
    Thanks for your inputs. Due to research on various sources including your's, I was able to write my own add-in for showing a Web Browser and display a website. Code below...
    using System.Windows.Forms;
    using Microsoft.Dynamics.Framework.UI.Extensibility;
    using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;
    
    namespace CEPLAddIns
    {
        [ControlAddInExport("CEPL.NAVAddIns.WebPartControl")]
        public class WebPartControl : WinFormsControlAddInBase, IValueControlAddInDefinition<string>
        {
            WebBrowser _browser;
            protected override System.Windows.Forms.Control CreateControl()
            {
                _browser = new WebBrowser
                {
                    Dock = DockStyle.Fill,
                    MaximumSize = new System.Drawing.Size(int.MaxValue, int.MaxValue)
                    //,MinimumSize = new System.Drawing.Size(600, 400)
                };
                return _browser;
            }
    
            public override bool AllowCaptionControl 
            {
                get{ return false; }
            }
    
            public bool HasValueChanged
            {
                get;
                set;
            }
    
            public string Value
            {
                get { return _browser.Url.PathAndQuery; }
                set { _browser.Navigate(value); }
            }
        }
    }
    
  • Dan77
    Dan77 Member Posts: 17
    It would also probably be possible to embed ReportViewer component inside an addin, if it has not yet been done...
    Hmmm... 'Might take a look at that this week-end :whistle:
  • shahidt
    shahidt Member Posts: 61
    Good idea, then we can use SSRS itself ;-)!!
  • shahidt
    shahidt Member Posts: 61
    Do you think it is possible to put this add-in in a Repeater group or something where we can bind the Control Add-In to a table that will show many websites, one below the other.
  • kine
    kine Member Posts: 12,562
    No, you cannot use addin in repeater... but all depends on how you create the addin - it can create many controls and open the URLs you will pass as value, e.g. separated with some separator... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • shahidt
    shahidt Member Posts: 61
    Dear Kine... thanks a million for your inputs. They have been tremendously helpful.

    I have attached a view of my current output. The placement of the browsers differ based on the number of browsers.

    One last problem on this though. While the control seems to work well within the boundries of the RTC Window in a Role Center, when I show it as a Page, it utilizes the entire window including the area where the Page Titles usually show up. I do not like this. Please see the image for a better idea.
  • Dan77
    Dan77 Member Posts: 17
    Old post, but I finished a geeky version of RS Viewer in an RTC add-in, a few month ago and I couldn't resist to show a screen of it.
    Working pretty well but still... When shown to Managers, they asked me what could be the use of it :shock:

    Anyway, waiting for Nav 7 and new report/query capabilities \:D/