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

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

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

    隨筆-112  評(píng)論-73  文章-0  trackbacks-0

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

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

    選中table ->details 然后在

    onPrepare方法中加入下面代碼

    var count=1;

    在onCreate方法中加入下面代碼

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

    這樣表格就可以是紅藍(lán)交替顯示了。

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

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

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

    3、參數(shù)類型

    birt 報(bào)表中的日期(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) 評(píng)論(1)  編輯  收藏

    評(píng)論:
    # re: birt應(yīng)用 2008-06-25 11:45 | RogerTu
    不錯(cuò),推薦BIRT官方中文論壇 http://www.actuatechina.com/index.php  回復(fù)  更多評(píng)論
      

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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 在线看片无码永久免费aⅴ | 美女无遮挡免费视频网站| 99久久久国产精品免费牛牛四川 | 亚洲av日韩av无码黑人| h在线看免费视频网站男男| 亚洲精品无码99在线观看| 一级**爱片免费视频| 国产精品亚洲不卡一区二区三区| caoporn国产精品免费| 最新国产AV无码专区亚洲| 全黄大全大色全免费大片| 亚洲VA中文字幕无码一二三区| 免费国产99久久久香蕉| 亚洲最大黄色网站| 成人免费777777| 亚洲依依成人亚洲社区| 久久精品女人天堂AV免费观看| 亚洲综合国产成人丁香五月激情| 浮力影院第一页小视频国产在线观看免费| 亚洲一线产区二线产区区| 亚洲成a人在线看天堂无码| 国产免费黄色无码视频 | 国产AV无码专区亚洲精品| 99热在线精品免费播放6| 亚洲国产日韩综合久久精品| 国产裸模视频免费区无码| 一级A毛片免费观看久久精品| 亚洲精品无码鲁网中文电影| 91精品国产免费久久久久久青草| 亚洲日本在线电影| 国产午夜亚洲不卡| 在线免费观看你懂的| 亚洲av乱码中文一区二区三区| 亚洲精品一级无码鲁丝片 | 日本卡1卡2卡三卡免费| 亚洲天堂免费在线| 亚洲综合无码精品一区二区三区| 精品福利一区二区三区免费视频| 久久无码av亚洲精品色午夜| 亚洲爱情岛论坛永久| 国产亚洲福利一区二区免费看|