|
Re: date input parameter in dd/MM/yyyy in birt 2.5 [message #491196 is a reply to message #491037] |
Tue, 13 October 2009 15:39 |
|
Ben,
On the parameter select the format as: and choose Custom. Enter
dd/MM/yyyy as the format. See attached example.
Jason
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.5.0.v20090603 Build <2.5.0.v20090617-0630></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<parameters>
<scalar-parameter name="mydate" id="7">
<property name="valueType">static</property>
<property name="dataType">date</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<property name="distinct">true</property>
<structure name="format">
<property name="category">Custom</property>
<property name="pattern">dd/MM/yyyy</property>
</structure>
</scalar-parameter>
</parameters>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</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>
<style name="crosstab-cell" id="6">
<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>
<body>
<data id="8">
<list-property name="boundDataColumns">
<structure>
<property name="name">mydate</property>
<expression
name="expression">params["mydate"].value</expression>
<property name="dataType">date</property>
</structure>
</list-property>
<property name="resultSetColumn">mydate</property>
</data>
</body>
</report>
Ben K wrote:
> Hi i'm new to birt, i've inherited some reports that are having some
> problems. they were written with 2.0 designer.
> I have since upgraded to 2.5 designer (with lots of headaches)
> i've managed to get it working, just one problem now - we have a date
> input parameter.
> in 2.0 it works as dd/mm/yyyy input
> in 2.5 it fails validation as a valid date (for input)
> it works if i change the input parameter date type to string type.
>
> How do i change the date parameter input format to dd/mm/yyyy
>
> also this forum is very hard to find!!
> anyhow help appreciated,
> cheers,
> Ben
>
|
|
|
|
|
Re: date input parameter in dd/MM/yyyy in birt 2.5 [message #491479 is a reply to message #491281] |
Wed, 14 October 2009 18:18 |
|
Ben,
Try this in the URL:
&mydate=22/11/2009&__islocale=mydate
Replace mydate with your parameter name. The __isLocale parameter
specifies that the parameter has been localized.
Jason
Ben K wrote:
> is there anywhere else that the local/date setting is configured?
>
> i'm doing more testing and when i do a preview in birt report designer,
> it accepts the report parameters in the right format ( dd/mm/yyyy) it is
> only when i copy the report to the server and run it using birt viewer
> that I seem to get the error.
> the server is linux, report designer windows if that helps too
|
|
|
|
Re: date input parameter in dd/MM/yyyy in birt 2.5 [message #491752 is a reply to message #491538] |
Thu, 15 October 2009 16:32 |
|
Ben,
I do not know of a way to do this.
You could open a bugzilla for this.
Jason
Ben K wrote:
> Hi Jason,
> Thanks again for your response!
>
> the &__islocale=mydate setting works
>
> is there a way to embed this setting into the rptdesign?
> or configure the server to use islocale for all paramters?
>
> I would prefer to only have to edit the birt viewer / reports than
> modify the application that generates link for the reports
>
> cheers,
> Ben
|
|
|
|
Powered by
FUDForum. Page generated in 0.03942 seconds