10 Replies Latest reply on Mar 30, 2012 11:10 PM by aommeren

    DataGrid on ProcessBook display

    aommeren

      Hello,

       

      I want to use the MS DataGrid control on a PB display in order to show AF data and data from another system.

       

      I am using PB 3.2.3, when I drop the control on the display it cannot be used - it does not show up as an object. I tried the same thing in 3.0 and there it is no problem.

       

      Any clue how to tweak PB? Maybe the answer is already out here somewhere but I did not find is (fast enough). Found some evidence in other (older) threads that is possible.

       

      Thanks,

       

      Ad

       

       

       

       

        • Re: DataGrid on ProcessBook display
          mhamel

          @Ad Van : Which version of Microsoft DataGrid are you using? I am using a PI ProcessBook v3.2.3 on a 64 bit OS (Windows 7) and I can manipulate the DataGrid without problem.

           

          Are you handling the DataGrid from a PI ProcessBook add-in? What do you use to copy your data from PI AF to your grid? PI OLEDB Enterprise or AF SDK calls wrapped in an add-in?

           

          It would help if you could detail more the solution you are using to populate the DataGrid.

            • Re: DataGrid on ProcessBook display
              wpurrer

              Hi Ad van ... i posted a similar addin on vcampus.osisoft.com/.../52.aspx ... maybe you have a look at it and it is usable for you,

               

              it uses an infragistics datagrid.

              • Re: DataGrid on ProcessBook display
                aommeren

                Hi Mathieu,

                 

                Thanks for helping out.

                 

                The ultimate goal is to fill a grid with AF attribute values for a set of elements. I intend to use OLEDB Enterprise to retrieve the data. I want to do this in the background from VBA.
                For another customer I will retrieve data from a SQL db and display it in a grid (just a table view of external data).

                The datasource and processing of data is not (yet) the issue here. At first I need to get the ocx to work.

                I tested on XP with PB 3.2.3 and selected the following (just to start my project):

                 

                - Microsoft Hierarchical Flexgrid Control6.0 (SP4)  - mshflxgd.ocx

                 

                But it does not show up on the ProcessBook display, instead I see something that looks like a ordinary PI Text field & takes the default colors for PB symbols & gets the name "Symbol1"

                 

                Since it works in 3.0.15.7 on XP (another machine) I feared it would not work in version 3.2.3 for some reason.

                 

                I will test on a few other combinations of OS and PB version.

                 

                 

                 

                Ad

                 

                 

                  • Re: DataGrid on ProcessBook display
                    aommeren

                    Some more testing (with the hierarchical flexgrid):

                     

                    works on XP + PB 3.0.15.7
                    does not work on XP + PB 3.2.3

                     

                    works on 2008R2 64bit + PB 3.2.3
                    does not work on W7 32bit + PB 3.2.3

                     

                    ....

                     

                    I need a grid for this specific project, the Flexgrid has most potential.
                    The customer has XP and PB 3.0.15.7

                     

                    Is the expected behavior, what is the explanation here?
                    And... is there a way to tweak ProcessBook or tweak the ocx (this one or another) or is there another approach.

                     

                    Ad

                     

                     

                     

                     

                      • Re: DataGrid on ProcessBook display
                        mhamel

                        @Ad Van: I found a similar problem from our KB database. I have added a link the KB article that gives you some solutions.

                         

                        Let me know if that helped you.

                          • Re: DataGrid on ProcessBook display
                            aommeren

                            Hi Mathieu,

                             

                            This sounded very promising, issue 2 is what I obeserved:

                             

                            Issue 2

                             

                            Using an older version of Microsoft ADO data control 6.0 or Microsoft DataGrid control 6.0 on a fresh install on Windows 7 would not properly load the controls in PI ProcessBook 3.x. Controls will show up as a mostly blue box with a heading at the top containing the name of the control. However, objects do not have properties and functionality the controls were supposed to have. Other controls, including the command button and combo box work fine.

                             

                             

                             

                            I followed this KB and the Microsoft KB's.
                            Since the only updates that were given were for VB 6.0 (did not find a patch just for all controls) I could not install it directly on my client pc (XP without VB6)

                             

                            I found an old pc with ACE and VB6 and performed the security patch there. The mshflxgd.ocx was upgraded. Then I moved the files from that machine to my client pc and did a regsvr32 of the newer ocx (and rebooted the machine)

                             

                            Unfortunately this didn't solve the issue: still a blue box when adding the control to the PB display.

                             

                             

                             

                            We have to find other ways - I hope this is not a dead end street

                             

                            Ad

                             

                             

                             

                             

                             

                             

                             

                             

                              • Re: DataGrid on ProcessBook display
                                mhamel

                                @Ad Van: What version of mshflxgd.ocx are you using? I did my test with version 6.0.88.4 and it works fine.

                                  • Re: DataGrid on ProcessBook display
                                    aommeren

                                    Hello Mathieu,

                                     

                                    Thanks for testing. This is quite frustrating. I opened a support call as well today (you never know). The support engineer has tested on 2 different environments. It worked fine with the same version you have.

                                    I also found that version (6.0.88.4) on one of my systems and copied it to the testbox - i unregistered / removed the installed ocx and copied / registered the "should work" version.
                                    I also cleaned up all exd files on the machine.

                                     

                                    Still no go.

                                     

                                    It should also be possible to drop the control on an Excel sheet but in my case I get the "Cannot insert object" error

                                     

                                    Thanks,

                                     

                                    Ad

                                      • Re: DataGrid on ProcessBook display
                                        aommeren

                                        Another test:

                                         

                                        My IT colleague gave me a new PC to run a test as well.

                                         

                                        It was a fresh install.

                                         

                                        W7 32 bit
                                        Excel 2010
                                        ProcessBook 3.2.3
                                        mshflxgd.ocx 6.1.98.12 (10-oct-08)

                                        In both ProcessBook and Excel the control cannot be used (in Excel: cannot insert object)

                                         

                                        .....................

                                         

                                         

                                          • Re: DataGrid on ProcessBook display
                                            aommeren

                                            this seems to work!....:

                                             

                                            I made a simple PB display and inserted the flexgrid - on a system where this was possible (PB 3.0.15.7 on Windows 2003)

                                             

                                            Then I copied that file to the development box at another customer where I had the trouble.

                                             

                                            Opening the pdi file there shows my grid !

                                             

                                            Thanks,
                                            Ad