#1 2016-10-17 15:53:50

mahdsip
Member
Registered: 2016-10-11

BIRT report date parameter Not working

Hello,

I have created a report with Eclipse BIRT with two datetime parameters, START and END linked to the parameters declared on the query:

select name from person where birth_date_time between ? and ?

If i execute it on exclipse BIRT it runs perfectly, but if i import the report into the reportServer the link between parameters in some point is not working.

In the report server, when i try to import the .rptdesing file the extract parameter tool is working (it detects START and END) and I just need to adjust the type to date and time parameter. In the layout, when I execute it,  i have two parts, one heading where i print out the value of the parameters that it is working as expected, and the main section with a table of names that is empty, where should appear all the person borned between selected parameter dates.

This table is not empty since  if i execute it on Eclipse BIRT the results are there, so my guess is that the parameters are being CASTED to string instead of DATETIME (thats why their value are being printed out in the heather properly) however is not working in the select clause.

Is that possible? How could I avoid that?

Thanks




Hello,

As an update, i tried to do exactly the same with a String Parameter.

           - I created the Dataset in Eclipse Birt with this jdbc query:

                     select name,birth_date_time from person where name = ?
           - I created one string parameter in Eclipse Birt linked to the query parameter
           - I created a heading on the report to see the value of the parameter
           - I created a table to show the results of the query.
           - If i execute this in Eclipse BIRT it runs perfectly.
           - When i import this report into reportServer, it automatically detects the String Parameter
           - If I execute it, it print out the parameter value correclty in the header, but the table is empty.

The conection with the datasource is correct too since if i dont make use of parameters, i retrieve all the values from the table.

Again, the link between report parameter and query parameter is not running as expected, since I get no results.

Can somebody please help me to figure out what i am doing wrong?

Thanks

Last edited by mahdsip (2016-10-19 19:16:44)

Offline

#2 2016-10-27 14:31:44

lmr
Member
Registered: 2015-12-10

Re: BIRT report date parameter Not working

hi mahdsip, i'll let someone else reply as to the link between report parameter and query parameter is not running as expected (as that goes beyond my understanding), but from the perspective of another user, here are three things to try:
1) is it possible to attach or provide a link to the rptdesign file to test, as that would allow other people to test
2) it may sound stupid, but have you stretched the 'detail' section in the table to make it larger to make sure it can accomodate your output...as I've had reports where BIRT handles them perfectly and stretches the table as needed, but on ReportServer the size of the table does not grow as it should
3) do any reports based on this dataset work on report server?  if you're not sure, create a simple table and see if it is linking.

Offline

#3 2016-11-02 12:19:06

eduardo
Administrator
Registered: 2016-11-01
Website

Re: BIRT report date parameter Not working

Hello mahdsip,

I recreated the steps you described with a String Parameter and the connection seems to work, as I get the expected results in the table.
So, indeed, please link the rptdesign file to test, and you can also check what query arrives at your database using some sql-profiler, e.g. in the MSSQL case the SQL-Server Profiler.
You can also check the server logs.

Offline

#4 2016-11-09 20:19:00

mahdsip
Member
Registered: 2016-10-11

Re: BIRT report date parameter Not working

Hi edulid,

Thanks for your response, I was considering using the server in a project but this issue stopped me from going ahead.  Here is the link to the file:

https://drive.google.com/file/d/0B__l85 … sp=sharing

As I mention above, it is a very simple report with just two dates parameters and one table to show details, it works on Eclipse BIRT (It stablish correctly the conection to database, a show all the data filtered by the dates) but when i try to exectute on Report Server i get 0 results.

Here is the snapshots:

Working on BIRT:    https://drive.google.com/file/d/0B__l85 … sp=sharing
Not Working on ReportServer:   https://drive.google.com/open?id=0B__l8 … Wl4QjNQUzg

Parameters on BIRT: https://drive.google.com/file/d/0B__l85 … sp=sharing
https://drive.google.com/file/d/0B__l85 … sp=sharing

Parameters on REPORTSERVER: https://drive.google.com/file/d/0B__l85 … sp=sharing
https://drive.google.com/file/d/0B__l85 … sp=sharing

I have been trying to locate the server logs but i couldnt find documentation about it, could you please give me a hand?

Thanks again.

Offline

#5 2016-11-18 15:56:13

eduardo
Administrator
Registered: 2016-11-01
Website

Re: BIRT report date parameter Not working

Unfortunately, the report you posted is not quite simple. Its query is complex, there is a lot of columns, you have some images embedded, etc. Since you described the problem also happening with simple text parameters, it would be easier to start with this.
Since I do not have your data, I am using the data of another user of this forum in a very simple table:

create table customers (
	id INT primary key,
	first_name VARCHAR(50),
	last_name VARCHAR(50),
	email VARCHAR(50),
	city VARCHAR(50)
);
insert into customers (id, first_name, last_name, email, city) values (1, 'Ruth', 'Walker', 'rwalker0@ezinearticles.com', 'Kyaiklat');
insert into customers (id, first_name, last_name, email, city) values (2, 'Stephanie', 'Black', 'sblack1@com.com', 'Risaralda');
insert into customers (id, first_name, last_name, email, city) values (3, 'Ruby', 'Murphy', 'rmurphy2@phoca.cz', 'Nanger');
insert into customers (id, first_name, last_name, email, city) values (4, 'Arthur', 'Lewis', 'alewis3@furl.net', 'Makilala');
insert into customers (id, first_name, last_name, email, city) values (5, 'Jeremy', 'Robertson', 'jrobertson4@biglobe.ne.jp', 'Káto Miliá');

We will be using the last_name for a parameter using the query:

select *
from  customers
where last_name = ?

Our parameter is param_last_name.
When importing to reportServer, the param is automatically detected and if I write "murphy", the customer with last_name "murphy" is being shown. So everything works for me.

The report is here: https://drive.google.com/open?id=0B3IdU … 1hwY1JCaWc
You have to add your own data-source element to the report.

If this report works for you, you could start from this report and adapt it for your needs. I think the problem is somewhere else, since, as I said, BIRT parameters are working normally for me (e.g. in the linked report).

Greets,
Eduardo

Offline

#6 2016-11-18 16:02:08

eduardo
Administrator
Registered: 2016-11-01
Website

Re: BIRT report date parameter Not working

Regarding the logs:
If you installed on windows, they are located in C:\Program Files\Apache Software Foundation\Tomcat 8.0\logs
assuming that you installed Tomcat in its default location.

The logs are located on your tomcat installation logs.

Offline

#7 2016-11-29 07:20:15

adamjones0143
Banned
From: Mumbai
Registered: 2016-11-29

Re: BIRT report date parameter Not working

Thank you Admin.

Offline

#8 2016-11-29 09:05:13

mahdsip
Member
Registered: 2016-10-11

Re: BIRT report date parameter Not working

Thanks for your help.

let me share something else regarding this issue. The rpt file was developed in a windows machine, while the server resides in a Ubuntu VM. This machine was deployed localy for testing (where i found the issue) but once I moved to production environment in a Windows server 2012 the problem has gone.

Is it possible this error are caused by a RPT file format?

Offline

Board footer

Powered by FluxBB