Poznámka
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
By default, after installing Window7 operation, there are many powerful and handy little tools in SidebarGadget, you can also download some customized Sidebar Gadget, such as: MSDN forum helper. Currently, we have some stock reports to show the real-time status of stock market, we also want to integrate SQL Reporting Services - stock report into window7’s Sidebar Gadget rather than open the IE all the time.
This article will walk you through the processes of integrating SQL Server Reporting Services into Windows 7 Sidebar Gadget.
Create a stock mark report and deploy it to Report Server
- Open SQL Server Business Intelligence Development Studio to create a Report Server Project named StockMark.
- Create a stock report named StockMarkStatus, you can also refer to the sample report I gave.
- Deploy the stock report to your Report Server
- Open the report on Report Server to make sure it can be open correctly.
Note: Please write down this report’s URL, you will make use of this URL in the following steps. Your URL just like this https://ServerName/ReportServer?/Reportpath/ StockMarkStatus
Create Gadget’s XML Definition File and Main HTML File
- Design a PNG image named icon, which is used in the Sidebar Gadget’s menu
- Open the folder C:\Program Files\Windows Sidebar\Gadgets
- Create a New folder named StockMarkStatus.gadget
- Copy the image to StockMarkStatus.gadget folder
- Create a HTML file named StockMarkStatus.html into the same folder
<html> <head>
<script language="javascript"> //----------------- resizes the gadget display surface function DoInit(timeoutPeriod) { document.body.style.width = 410; document.body.style.height =240; document.body.style.margin = 0; document.body.style.background = "gold"; setTimeout("location.reload(true);", timeoutPeriod);
}
</script> </head>
<body onload="JavaScript:DoInit(10000)"> <div> <iframe id="rpt" src="https://ServerName/ReportServer?/Reportpath/ StockMarkStatus&rs:Command=Render&rc:Toolbar=False" style="BACKGROUND-COLOR:transparent" name="doc" frameBorder="no" width="100%" height="100%" scrolling="No" /> </div> </body> </html>
|
Note: Please change your report server URL at iframe src attribute. Change the JavaScript DoInit method parameter value based on your refreshment frequency.
- Create a gadget.xml file using below content:
<?xml version="1.0" encoding="utf-8" ?> <gadget> <name>StockMarkStatus</name> <namespace>microsoft.windows</namespace> <version>1.0.0.0</version> <icons> <icon height="28" width="28" src="icon.png"/> </icons> <hosts> <host name="sidebar"> <autoscaleDPI>true</autoscaleDPI> <base type="HTML" apiVersion="1.0.0" src="StockMarkStatus.html"/> <permissions>Full</permissions> <platform minPlatformVersion="1.0"/> </host> </hosts> </gadget> |
Test this tool in Windows 7 Sidebar Gadget
- Right-click the windows7 desktop, then select Gadgets, you will see StockMarkStatus menu in Gadget like below:
- Right-click the Icon of StockMarkStatus, then select Add button, just like other Gadget tools, you will see the stock report showing on the desktop with ten second refreshment frequency.
Reference:
Build Your Own Windows Vista Sidebar Gadget
Comments
- Anonymous
July 09, 2011
I CREATE GADGET! VERY GOOD SQL!TRY!