I would like to show you how to integrate
PI DataLink for Excel Services with
RtWebParts.
In this Lab
we are going to make use of the new Excel
Webox... Access WebPart to demonstrate
the integration of the Pa... PI Server with SharePoint
using RtWebParts.
Most of his Lab will
show you how to publish the
Excel Web... Excel spreadsheet
to SharePoint and how to configure
the Excel Web Access WebPart. If you
will like to see the final result and
do not want to work through the Lab, all you have to do is
open Internet Explorer. There is a Solutions
Site in which we have created
already a Solution with the WebPart and the
spreadsheet. And here you can see the end
result. You can search through Tag Names
and different ranges. But,
let's go ahead and start working on this Lab.
The first thing that we want to do is go to the Labs
Folder, Client Tools, Workspace Folder,
where we already have a spreadsheet named
DataLink Demo. Open that file,
and once you open it, you will see that
it does not have the correct PI Server
Name in there. You will have to update
the PI Server Name to
OSIsoft-trng.
Once we do that, we are also going
to create two parameters that will
help us when we publish this file to
SharePoint. So, Pi Server, let's
update that -- OSIsoft.trng.
And,
we can see in here the
values that are being displayed. In order to get
the graph, the easiest way to do that is to
save your file without doing any, any other changes
and close it, and then re-open
the file and allow Excel
to update the graph. And that is the easiest way
in which I, I have been able to do that.
Now, what we want to do is create two parameters:
one for the Tag Name and one
for the Time Range. The way we do that is
by selecting the cell B2 where we have the
Tag Name. We go to the Formulas Tab,
go the the Find Name,
and in the, the Find Names Menu,
there is a dialog that appears.
We want to enter
tag_name.
As the name of this parameter.
Click OK, and we
can do the same for the Time Range.
Go to cell B6. Go
to the Find Name, and we will name this
time_
range. And now, if you look
at the Name Manager, you should see the two
new parameters, tag_name and time_range.
Okay. We are now ready to
Save and Publish this file.
And what we want to do is to use the
publishing feature to Excel Services.
Make sure that you uncheck the Open in Excel Services
check-box, and click on Excel Services
Option. Make sure that you only have
Sheet #1 selected, and in the parameters
click Add and select
the two parameters that we created so
that they are also publish... they are also published
along with the file. Now,
we want to go ahead and
Save or Publish this file to a
SharePoint Library. The easiest way to get
the path right to the Library is to open
SharePoint and navigate to the Library
where you want to save that file. Under Lab
Site, we have a
Shared Documents Library. If you click on
it, you will go -- be able
to go ahead and copy the path
to that Library. Now, I am going to
go ahead and -- let me show you right here. One
thing that we do not need is the
Forms and All Items portion
of the Library. So just copy the
path to the Name
of the Library, Shared Documents. Go back to
Excel. Let's go ahead and paste that
right in front of the file and
click Save, and, see, we can
perform the
operation. So now we should be able to go back
to the Library, Refresh,
and there we have our new file that was
published to the Library. In here,
we can go ahead now and create
a WebPart Page by going
to Site Actions, Create,
Selecting WebPart Page, and
I am going to name this DataLink
Web Access,
and I am going to select
a layout
that has a Header,
Left Column and Body. And I want
to save that to my Shared Documents Library,
and click Create.
Now that I have my
new WebPart Page, I can
go ahead and add WebParts.
In the body portion
of the page, I am going to click Add a
WebPart, and I am going to find the Excel
Web Access WebPart, Select that one,
Add, and then I am
going to configure this to show
the file that I
published to the Shared Documents by clicking on
Edit, the Excel Web Access WebPart, Modify
the Share WebPart. And
now I am going to navigate with this
Ellipses Button to the Shared
Documents Library and the file
that I published.
So, that will click on that file. I can go ahead
and say OK now,
and in, momentarily, I should be able to
display the file that I published.
In here, I can go ahead
and click on Exit, Edit Mode,
and I can play around with
my new WebPart by
entering a new
Tag Name and entering
new Ranges, also of Time. So, let's
say that I want a range going from
now to maybe
45
days back.
Let's see what comes up. Alright, so
plenty of data 45, 45
days back. Let's see, what about CDT
158?
Alright. So, we also have some
data there for CDT.
Now what I want to do is I want to go
ahead and
edit this page.
And, I am going to add an
RtTimeRange WebPart and also
a TextFilter WebPart in order
to submit a Time
Range and a Tag Name without having
to use these parameter fields
here within, within the Excel spread-
sheet. So, in the left column,
I am going to add a WebPart, and I am going
to look for the
RtTimeRange WebPart,
Select it, Add, and I
will modify it. I want to
go to Edit, Modify,
and what I want to do here --
I want to use a
Vertical
Layout. I am going to
click OK. And from the
Edit Menu, I am going to go to
Connections in the RtTimeRange, Send
Filter Data to the Excel Web Access
DataLink Demo Part.
In here, the Connection Dialog Window
opens, and I want to select
Get Filter Values From,
Configure the Connection, and I am going to use
those Filter Values
from the TimeRange.
And, let's see if this is going to work.
And, the way I can test it
here is by
Exit the Editing Mode, and I can
go ahead and enter 24 hours
and let's see how the data
changes. So, I, I see here
that the data is changing.
It went back to 24 hours.
Let's go ahead and do
45 days,
apply that, and see how
I can not only now change
the Time Range, but I can also use
my scroll back and forward features, I can revert
to the Default Settings,
I can scroll back with
the arrows,
and that's all very well. Now, let's go ahead
and configure a TextFilter WebPart
so that we can do a similar thing.
Let's go to Site Actions, Edit Page. We can do
a, a similar thing with the Tag Name.
In here, now, I am going to add another
WebPart. This is going to be
a TextFilter WebPa... WebPart,
and if I scroll down --
let me see if I can find
this
TextFilter. Here we go.
Click Add.
And what I want to do now, I want
to Modify this
WebPart. I want to enter a
Filter Name which I am going to
call Tag Name, and
I am going to enter
a Default Value by going
to the Advanced Options,
and, here --
let me see. I think I,
I missed it.
There is Advanced Filter Options, Default Value,
Sinusoid.
And in the Option that I opened earlier,
Appearance, I want to
change the title of this
and I am going to
name it
Tag Name, also. I am going
to click OK. And now, I am going
to configure the connections
by sending Filter Values
to the Excel Access WebPart.
Again, I want to configure this and use tho...
Those values for the Tag
Name. Click on Finish. And now, if I
Exit the Edit More, I can see now how
the fields
for my Tag Name and Time Range
have disappeared because now
these WebParts are connected and
I can go ahead and enter CDT158
here, and
update the information. I can go ahead and
revert back to the
Default TimeRange which is
Now to two hours ago.
And I can see how all the features in
here are working. Very, very
useful WebPart. The client is not
required to have Excel to be able to access
this WebPart and enjoy of many of the
features, the Display Options of Excel,
without having to have Excel
actually installed in your local machine.
All you need to have is Excel Services
running in SharePoint.
And, you just
need to create the Excel File
and publish it to that Shared Document Library.
I hope you enjoyed the Lab, and until next
time.