顯示具有 Project 標籤的文章。 顯示所有文章
顯示具有 Project 標籤的文章。 顯示所有文章

2010年9月21日 星期二

IE 9 Beta 上無法使用 Project Server 2003 來回報工時

IE 9 Beta 的效能的確相當快。但畢竟是 Beta 版,難免有許多的 bug,造就一些奇特現象。

我們公司是使用 Project Sever 2003 來管理專案進度。回報專案工時是專案成員的每日工作之一。無奈,一旦安裝了 IE 9 Beta,一進到「任務」頁,網頁就被迫回到首頁,相當莫名其妙。

解法呢?正確的解法當然是等 IE 9 修正這個 bug 了。而目前我得到的暫時解法,是點選按「文件」頁,再點選「任務」頁,就ok 了。

image

真是怪。

2009年7月3日 星期五

[Project 2003]如何設定專案在儲存時,自動發佈專案計劃

問題

審核完工時後,我常常只會儲存專案,忘了「共同作業/發佈/專案計劃」。有沒有更簡單的做法?

解答

設定此專案在儲存時,自動發佈專案計劃

步驟

1. 以Project 2003 打開專案,執行「共同作業/共同作業選項」

image

2. 視需要勾選「新增及變更的工作分派」、「專案摘要」、「包含完整專案計劃」後,按確定鍵。

3. 儲存專案

image

2009年3月17日 星期二

Project 讀取大綱

最近又重操舊業了。又是 Project Server 2003.

原本的目的,是要讀取 Project Server 上某一專案的實際完成百分比。

下面的方法,原意是使用 Office DOM 來取得專案資訊。
這樣的方法,可以找到許多資料,但怎麼找也找不到實際完成百分比。

static void Main(string[] args)
    {
      ApplicationClass application = new ApplicationClass();
      application.Visible = true;
      bool opened = application.FileOpen(@"<>\伺服器上的專案.已發佈", 
        true, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value,
PjPoolOpen.pjPoolReadOnly, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

      Project p = application.ActiveProject;
      short i = (short) p.PercentComplete; //完成百分比
      short i2 = (short)p.PercentWorkComplete; //工時完成百分比

      foreach (OutlineCode item in p.OutlineCodes)
        Console.WriteLine(item.Name + item.FieldID.ToString()); //大綱
    }

注意到上面這一段程式,必須先執行 Project 2003 上連線到 Project Server 後再執行該程式。否則會有錯誤發生。

另外,Project Server 上的專案,必須以 <>\ 開頭來載入,這是比較奇怪的地方

更新!
可以讀取實際完成百分比了。而且也可以指定 status date 哦!程式片斷如下

private static short GetPhysicalPercentComplete(ApplicationClass application, string webProjName,
      DateTime statusDate)
    {
      bool opened = application.FileOpen(webProjName,
        true, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value,
PjPoolOpen.pjPoolReadOnly, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

      Project p = application.ActiveProject;
      p.StatusDate = statusDate;
      application.CalculateProject();
      Thread.Sleep(500);
      short physicalPercentComplete = (short)p.Tasks.get_UniqueID(0).PhysicalPercentComplete;
      application.FileClose(PjSaveType.pjDoNotSave, true);

      return physicalPercentComplete;
    }

Share with Facebook