<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毛片| 四虎影视成人永久免费观看视频 | 在线免费播放一级毛片| 亚洲人成中文字幕在线观看| 国产免费网站看v片在线| 无码乱人伦一区二区亚洲| 91福利免费体验区观看区| 亚洲中文字幕久在线| 成人毛片免费视频| 色欲aⅴ亚洲情无码AV蜜桃| 亚洲Av无码乱码在线播放| 福利免费在线观看| 亚洲三级电影网址| 三年片在线观看免费大全| 亚洲国产欧洲综合997久久| 亚洲国产精品成人网址天堂| 可以免费观看的国产视频| 亚洲成a人片毛片在线| 大学生美女毛片免费视频| 免费国产黄网站在线观看动图 | 亚洲午夜精品一区二区麻豆| 四虎影永久在线高清免费| 中文在线免费观看| 亚洲国产精品午夜电影| 国产又大又长又粗又硬的免费视频 | 69视频在线观看高清免费| 亚洲一区二区观看播放| 亚洲精品一级无码鲁丝片| 日韩插啊免费视频在线观看 | 久久亚洲精品中文字幕无码| 国产免费女女脚奴视频网| 日韩毛片在线免费观看| 亚洲综合区图片小说区| 免费观看日本污污ww网站一区| 免费人成黄页在线观看日本| 亚洲av日韩综合一区二区三区|