#1 2015-12-16 10:35:02

ralex
Member
Registered: 2015-04-20

How to pass a date parameter in a way different from the default one

Hi,
a birt report ,having two date parameter, is called via URL with start and end date.
I noticed the default format on my system is dd-MMM-YYYY (in italian). For example - 04-Gen-2015
Since our servlet who makes the URL receive the date values in format like dd/mm/yyyy , I wonder if there is a change to modify it.
I am thinking something such as a script, called via script access url, who will manipulate the date, because I don't think there is a method to directly manipulate the date format by using the httauthexport servlet.
If  there is a method via script, what class/methods should I have to call ?


In other words, I'm wonder if I can get a value date parameter like this : p_startDate=04/01/2015 instead of p_startDate=04-Gen-2015 in the url

Thanks,
Cheers,
Alex

Last edited by ralex (2015-12-16 13:41:03)

Offline

#2 2015-12-16 13:54:17

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to pass a date parameter in a way different from the default one

Hi Alex,

as for the first question. We've added a configuration parameter which allows to control the date format used when specifying url parameters. In the current version this can only be accomplished with some extensive scripting.

As for the second question, my guess is that the locale of your ReportServer is different than that of the birt designer. The easiest would be to hard code the format into the birt report.

Cheers
Arno

Offline

#3 2015-12-16 14:25:12

ralex
Member
Registered: 2015-04-20

Re: How to pass a date parameter in a way different from the default one

Ok,
for the second question I sorted it out wink
for the first one, this feature you're talking about will be present in next coming release?

Cheers,

Alex



Arno Mittelbach wrote:

Hi Alex,

as for the first question. We've added a configuration parameter which allows to control the date format used when specifying url parameters. In the current version this can only be accomplished with some extensive scripting.

As for the second question, my guess is that the locale of your ReportServer is different than that of the birt designer. The easiest would be to hard code the format into the birt report.

Cheers
Arno

Offline

#4 2015-12-16 14:52:13

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to pass a date parameter in a way different from the default one

Yes

Cheers
Arno

Offline

#5 2015-12-16 15:14:02

ralex
Member
Registered: 2015-04-20

Re: How to pass a date parameter in a way different from the default one

great news! smile
In the meantime, I'm trying to make a script...I only need to know what is the object/method to manipulate my original date that I get via URL (example 23/01/2015)  in the date format that reportserver expects to have ( 23-Gen-2015) ?
I think something replace/substitute....but I don't know where to look at the api doc.
Thanks,
Cheers,
Alex

Offline

Board footer

Powered by FluxBB