問題:
在跑一個很大的報表時,常會被電腦中其他的作業中斷,如何避免?
答案:
按「Ctrl-Alt-Del」叫出「Task Manager」,切換到「Processes」在「crw32.exe」上按下滑鼠右鍵選擇「Set Prority」à「High」。
2009年11月26日 星期四
如何部署Crystal Report ?
目的:
使用安裝專案,部署Crystal Report。
作者:brian_wang
語言:
步驟:
照一般建立安裝專案,加入合併模組:
(1)regwiz.msm
(2)Managed_cht.msm
(3)managed.msm
(4)Database_Access.msm
(5)Database_Access_cht.msm
(6)dotnetfxredist_x86_cht.msm
其中(3)(6)項在建立完專案時自動加入到偵測到的相依性其餘需手動加入,在第(1)項的屬性中需設定license key(在屬性視窗中可找到) 。
license key( xxxxx-xxxxxxx-xxxxxxx)在說明中最後一個選項(關於 microsoft....)可以找到。
若是報表連結時使用到DataSet ,則須另外加入 VC_CRT.msm 及VC_STL.msm 兩個項目。且需先在檔案系統中增加系統資料夾 再將VC_CRT.msm 及VC_STL.msm 兩個項目的Module Retargetable Folder的屬性設為系統資料夾,接下來便開始建置...........
使用安裝專案,部署Crystal Report。
作者:brian_wang
語言:
步驟:
照一般建立安裝專案,加入合併模組:
(1)regwiz.msm
(2)Managed_cht.msm
(3)managed.msm
(4)Database_Access.msm
(5)Database_Access_cht.msm
(6)dotnetfxredist_x86_cht.msm
其中(3)(6)項在建立完專案時自動加入到偵測到的相依性其餘需手動加入,在第(1)項的屬性中需設定license key(在屬性視窗中可找到) 。
license key( xxxxx-xxxxxxx-xxxxxxx)在說明中最後一個選項(關於 microsoft....)可以找到。
若是報表連結時使用到DataSet ,則須另外加入 VC_CRT.msm 及VC_STL.msm 兩個項目。且需先在檔案系統中增加系統資料夾 再將VC_CRT.msm 及VC_STL.msm 兩個項目的Module Retargetable Folder的屬性設為系統資料夾,接下來便開始建置...........
如何設計動態的Top N報表?
問題:
如何設計動態的Top N報表?
答案:
用Crystal Reports 9的「Add Command」新功能。
1. 撰寫一個Command其中用一個參數來控制要選出前幾個(N)群組。
Access版的SQL Command
SELECT TOP {?N} `Customer`.`Country`, SUM(`Customer`.`Last Year's Sales`) AS Sum_Last_Years_Sales
FROM `Customer` `Customer`
GROUP BY `Customer`.`Country`
ORDER BY SUM(`Customer`.`Last Year's Sales`) DESC
SQL Server版的SQL Command
SELECT TOP {?N} SUM("CUSTOMER"."Last Year's Sales")AS Sum_Last_Years_Sales,"CUSTOMER"."COUNTRY"
FROM "Xtreme"."dbo"."CUSTOMER" "CUSTOMER"
GROUP BY "CUSTOMER"."COUNTRY"
ORDER BY SUM("CUSTOMER"."Last Year's Sales") DESC
2. 同樣在「Add Command」裡加入一個Paramenter:名稱為N、型別為Number。
3. 把「Sum_Last_Years_Sales」及「COUNTRY」欄位放入「Details」區段。
重新整理報表。便可根據使用者輸入的數字,動態顯示前N大群組。
如何設計動態的Top N報表?
答案:
用Crystal Reports 9的「Add Command」新功能。
1. 撰寫一個Command其中用一個參數來控制要選出前幾個(N)群組。
Access版的SQL Command
SELECT TOP {?N} `Customer`.`Country`, SUM(`Customer`.`Last Year's Sales`) AS Sum_Last_Years_Sales
FROM `Customer` `Customer`
GROUP BY `Customer`.`Country`
ORDER BY SUM(`Customer`.`Last Year's Sales`) DESC
SQL Server版的SQL Command
SELECT TOP {?N} SUM("CUSTOMER"."Last Year's Sales")AS Sum_Last_Years_Sales,"CUSTOMER"."COUNTRY"
FROM "Xtreme"."dbo"."CUSTOMER" "CUSTOMER"
GROUP BY "CUSTOMER"."COUNTRY"
ORDER BY SUM("CUSTOMER"."Last Year's Sales") DESC
2. 同樣在「Add Command」裡加入一個Paramenter:名稱為N、型別為Number。
3. 把「Sum_Last_Years_Sales」及「COUNTRY」欄位放入「Details」區段。
重新整理報表。便可根據使用者輸入的數字,動態顯示前N大群組。
CrystalReport報表匯出成PDF格式的語法
doc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, State, Server.UrlEncode("ATM繳費單"))
訂閱:
文章 (Atom)