|
|
|
Re: how to set a datetime parameter default to 11:59:59 pm [message #668264 is a reply to message #668248] |
Wed, 04 May 2011 18:10 |
|
what is doing the dividing? How is the parameter passed to tivoli? It
should be fairly simple to set the time but with a datetime field the
date will need to be set.
Jason
On 5/4/2011 12:14 PM, tong123123@yahoo.com.hk wrote:
> when imported to tivoli common reporting, the datetime parameter will
> divided to two part, one has a calendar popup to enter date, another is
> a clock icon to enter time.
> I want the user can just select the date and the time will be default to
> 11:59:59pm (and this default value can be visible and modify by the user)
> is this possible?
>
> thanks in advance
|
|
|
Re: how to set a datetime parameter default to 11:59:59 pm [message #668301 is a reply to message #668264] |
Thu, 05 May 2011 02:06 |
Missing name Mising name Messages: 81 Registered: April 2011 |
Member |
|
|
I do not know how to attach file in this forum.
in eclipse birt designer, it is just a datetime field (one field), but when imported to tivoli common reporting, the field is shown as two component (do not know the reason), one component has a calendar icon to enter date part, another is a clock component to enter time part, if user just enter the date without the time part, the application will assume the time is 12:00:00 am, but I want if the user just input the date, the time will be default to 11:59:59 pm.
Also, I want this default value can visible to user, otherwise, user will not know the time is default to 11:59:59 pm.
|
|
|
Re: how to set a datetime parameter default to 11:59:59 pm [message #668415 is a reply to message #668301] |
Thu, 05 May 2011 15:09 |
|
Just select the xml view and copy and paste the xml to your response.
What does the date default to?
Jason
On 5/4/2011 10:06 PM, tong123123@yahoo.com.hk wrote:
> I do not know how to attach file in this forum.
> in eclipse birt designer, it is just a datetime field (one field), but
> when imported to tivoli common reporting, the field is shown as two
> component (do not know the reason), one component has a calendar icon to
> enter date part, another is a clock component to enter time part, if
> user just enter the date without the time part, the application will
> assume the time is 12:00:00 am, but I want if the user just input the
> date, the time will be default to 11:59:59 pm.
> Also, I want this default value can visible to user, otherwise, user
> will not know the time is default to 11:59:59 pm.
|
|
|
|
|
|
Re: how to set a datetime parameter default to 11:59:59 pm [message #668665 is a reply to message #668545] |
Fri, 06 May 2011 15:52 |
|
It 2.2.1 it is more difficult to do than in later versions of BIRT.
Essentially you have to create a scripted dataset that you tie to the
parameter. Take a look at this example.
Jason
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.15"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.2.1.r221_v20070924 Build <2.2.0.v20070924-1550></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2007 <<Your Company
Name here>></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<parameters>
<scalar-parameter name="NewParameter" id="9">
<property name="valueType">dynamic</property>
<property name="dataType">string</property>
<property name="paramType">simple</property>
<property name="controlType">list-box</property>
<property name="dataSetName">Data Set</property>
<expression name="valueExpr">dataSetRow["dt"]</expression>
<property name="mustMatch">true</property>
<property name="fixedOrder">true</property>
<property name="distinct">true</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
<data-sources>
<script-data-source name="Data Source" id="6"/>
</data-sources>
<data-sets>
<script-data-set name="Data Set" id="7">
<list-property name="resultSetHints">
<structure>
<property name="position">0</property>
<property name="name">dt</property>
<property name="dataType">date-time</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">dt</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">dt</property>
<property name="dataType">date-time</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<method name="open"><![CDATA[ii=0;]]></method>
<method name="fetch"><![CDATA[if (ii > 0 )return false;
var myDate = new Date();
myDate.setHours(11);
myDate.setMinutes(59);
myDate.setSeconds(59);
row["dt"] = myDate;
ii++;
return true;]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="crosstab-cell" id="4">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
</report>
On 5/6/2011 3:55 AM, tong123123@yahoo.com.hk wrote:
> birt version 2.2.1
>
> Quote:
>> <property name="author">IBM Tivoli Common Reporting</property>
>> <property name="createdBy">Eclipse BIRT Designer Version
>> 2.2.1.r221_v20070924 Build <2.2.0.v20070924-1550></property>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04676 seconds