2009年7月22日 星期三

Report tools for .Net and ASP.Net

找 Report tools 的評量條件:
1. 報表製作工具(Designer)的容易上手
2. Viewer:效能,供分頁、換頁,查詢
3. 列印功能
4. 支援多種匯出格式
5. 簡單的報表可以快速產出
6. 中文支援&中文字體支援
7. 對樞紐分析報表的支援
8. 安裝及建置的便利性(例如:client是否要裝VIEWER、Server是否要裝軟體)
9. 同時支援Win-Form & Web-Form

常見的TOOLS
1. 一般作元件的廠商都有提供報表元件及TOOL:
DevExpress, ComponentOne, Telerik
2. 其他以報表製作工具為主的廠商:
Dundas, Crystal Reports

參考資料: www.componentsource.com

[技術筆記] SQL Server Full-text Search全文檢索

--Implementing Full Text Search with T-SQL stored Procedures / Eli Leiba
Enabeling Full Text search in T-SQL is usually not so "popular" as doing it with the EnterPrize Manager
So Here are the T-SQL steps you have to do in order to implement FTS in T-SQL

--1 Enabling full text on the database
EXEC sp_fulltext_database 'enable'

--2 Create the Catalog (if does not exist)
EXEC sp_fulltext_catalog 'MyCatalog','create'

--3 add a full text index on a Table
EXEC sp_fulltext_table 'Products', 'create', 'MyCatalog', 'pk_products'
EXEC sp_fulltext_table 'Categories', 'create', 'MyCatalog', 'pk_categories'

--4 add a column to the full text Index
EXEC sp_fulltext_column 'Products', 'ProductName', 'add'
EXEC sp_fulltext_column 'Categories', 'Description', 'add'

--5 activate the index
EXEC sp_fulltext_table 'Products','activate'
EXEC sp_fulltext_table 'Categories','activate'

--6 start full population
EXEC sp_fulltext_catalog 'MyCatalog', 'start_full'

-- usage in T-SQL (CONTAINS and FREETEXT predicates)
-- Using the index in T-SQL
USE Northwind
GO
SELECT ProductId, ProductName, UnitPriceFROM Products
WHERE CONTAINS( ProductName, ' "sasquatch " OR "stout" ' )
GO
USE Northwind
GO
SELECT CategoryNameFROM Categories
FREETEXT (Description, 'sweetest candy bread and dry meat' )
GO

2009年7月21日 星期二

[技術筆記] SharePoint 2007 開發與管理需要的工具與軟體

[技術筆記] Repeater中尋找控制項

作  者:黃家瑞 精誠資訊 恆逸教育訓練中心講師
技術分類:程式設計

Repeater
開發ASP.NET程式時,Repeater是一個非常實用的控制項,可是實際操作時總會遇到點瓶頸,就像以下的例子(以北風northwind資料庫作為例子),當完成了將員工資料利用Repeater載入網頁後,面臨一個頭痛的問題,在每個Itemtemplate裡面的按鈕,btnCalc按下去後,希望可以算出該項目的資料(這裡以計算出到目前為止的年資為例),問題是,怎麼”找到”這一個項目中的控制項內容?
"    SelectCommand="SELECT [EmployeeID], [FirstName], [LastName], [HireDate]            FROM [Employees]">







  EmployeeId:<%#Eval("EmployeeId") %>


  Name:<%#Eval("FirstName") %> <%#Eval("LastName") %>


  HireDate:' />


  

  

  




>  


利用一個簡單的語法就可以找到按鈕旁邊的Label控制項。
protected void btnCalc_Click(object sender, EventArgs e) {
Label lblDate = (Label)((Button)sender).NamingContainer.FindControl("lblHireDate"); Label lblYr = (Label)((Button)sender).NamingContainer.FindControl("lblYear");   DateTime d;
if (DateTime.TryParse(lblDate.Text, out d))
 lblYr.Text = (DateTime.Today.Subtract(d).Days / 365.0).ToString("#.00");
}

NamingContainer可以在Repeater中找到目前控制項的容器(Container),在這個容器中,找到該控制項。這樣子就可以很容易的操作在Repeater中的控制項了。



2009年7月1日 星期三

SharePoint 2007書籍

1. Microsoft SharePoint 2007 Development Unleashed
by Kevin Hoffman‧Robert Foster
悅知有出翻譯版 : http://www.delightpress.com.tw/book.aspx?book_id=SKTP00022
某些章節可以一讀,或是先看這本,然後再詳讀下一本

2. Inside Microsoft Windows SharePoint Services 3.0
by Ted Pattison; Daniel Larson
非常詳盡的說明SharePoint的架構與客製的作法,值得一讀