<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-112  評論-73  文章-0  trackbacks-0

    有轉(zhuǎn)載有原創(chuàng),就算做個整理吧.

    1、row 的背景顏色交替變換

    選中table ->details 然后在

    onPrepare方法中加入下面代碼

    var count=1;

    在onCreate方法中加入下面代碼

    count++;
    this.getStyle().backgroundColor=(count%2==0?"red":"blue");

    這樣表格就可以是紅藍交替顯示了。

    2、按一定的條件顯示特定行,比如以紅色顯示數(shù)量小于0的行

    if( row["inQ"]<0)
    this.getStyle().backgroundColor="red";

    其中之一"inQ"是表中的列名,不一定是數(shù)據(jù)集成的列名,一開始以為是數(shù)據(jù)集成的列名,搞了好長時間。如果列名與數(shù)據(jù)集中的列名一樣就沒有問題了。

    3、參數(shù)類型

    birt 報表中的日期(date)型參數(shù)是java.sql.Date而不是java.util.Date

    是看birt 源碼才知道,下面是檢查參數(shù)類型的方法的代碼

    private boolean validateParameterValueType(String paramName, Object paramValue, String type, ScalarParameterHandle paramHandle)
    throws ParameterValidationException
    {
    if("decimal".equals(type) || "float".equals(type))
    if(paramValue instanceof Number)
    return true;
    else
    throw new ParameterValidationException("Error.InvalidParameterType", new String[] {
    paramName, type, paramValue.getClass().getName()
    });
    if("dateTime".equals(type))
    if(paramValue instanceof Date)
    return true;
    else
    throw new ParameterValidationException("Error.InvalidParameterType", new String[] {
    paramName, type, paramValue.getClass().getName()
    });
    if("date".equals(type))
    if(paramValue instanceof java.sql.Date)
    return true;
    else
    throw new ParameterValidationException("Error.InvalidParameterType", new String[] {
    paramName, type, paramValue.getClass().getName()
    });
    if("time".equals(type))
    if(paramValue instanceof Time)
    return true;
    else
    throw new ParameterValidationException("Error.InvalidParameterType", new String[] {
    paramName, type, paramValue.getClass().getName()
    });
    if("string".equals(type))
    {
    if(paramHandle.isRequired())
    {
    String value = paramValue.toString().trim();
    if(value.length() == 0)
    throw new ParameterValidationException("Error.ParameterValueBlank", new String[] {
    paramName
    });
    }
    return true;
    }
    if("boolean".equals(type))
    {
    if(paramValue instanceof Boolean)
    return true;
    else
    throw new ParameterValidationException("Error.InvalidParameterType", new String[] {
    paramName, type, paramValue.getClass().getName()
    });
    } else
    {
    return true;
    }
    }


    Technorati :

    posted on 2008-05-16 16:14 Libo 閱讀(480) 評論(1)  編輯  收藏

    評論:
    # re: birt應用 2008-06-25 11:45 | RogerTu
    不錯,推薦BIRT官方中文論壇 http://www.actuatechina.com/index.php  回復  更多評論
      

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導航:
     
    主站蜘蛛池模板: 亚洲一区二区三区在线视频 | 亚洲熟妇自偷自拍另欧美| 西西人体免费视频| 久久乐国产精品亚洲综合| 一级毛片a女人刺激视频免费| 日韩毛片无码永久免费看| 亚洲av无码一区二区三区在线播放 | 亚洲自偷自拍另类12p| 未满十八18禁止免费无码网站| 亚洲AV无码成人精品区在线观看 | 在线亚洲97se亚洲综合在线 | 鲁啊鲁在线视频免费播放| 亚洲精品国产成人影院| 精选影视免费在线 | 亚洲av最新在线网址| 久久久免费的精品| 亚洲国产美女在线观看| 女性无套免费网站在线看| 国产午夜亚洲精品不卡免下载| 亚洲国产精品无码久久久久久曰| 新最免费影视大全在线播放| 在线亚洲人成电影网站色www| 免费精品无码AV片在线观看| 91天堂素人精品系列全集亚洲| 思思re热免费精品视频66| 亚洲精品无码一区二区| 亚洲国产成人a精品不卡在线| 91在线免费视频| 亚洲国产美女福利直播秀一区二区| 青青青青青青久久久免费观看| 免费的黄网站男人的天堂| 亚洲av无码乱码国产精品fc2| 成年网站免费视频A在线双飞| 免费国产草莓视频在线观看黄| 亚洲午夜久久久影院| 色影音免费色资源| 国产成人亚洲综合在线| 午夜亚洲国产理论秋霞| 狠狠久久永久免费观看| 曰批全过程免费视频在线观看无码 | 亚洲精品**中文毛片|