+1 vote
1 view

Hi

I’m using birt for creating parametric report.

I want to define a parameter which can take multiple values. So I’ve defined a parameter as below and then added it in “Parameters” section in the “edit data set” panel.

And this is my query for the data set: 

SELECT `time` , `name_client` , name
FROM `mornings`
INNER JOIN `users` ON mornings.user_id = users.id where name=?

On the other hand, I have created a LOV and an analytical Driver which takes its data from the LOV and it’s “select modality” Is “select form list”.

Then I have added this Driver in “Document Analytical Driver” panel and set Multivalue: “True”. But when I run the report and Chose 2 value (or more ) Simultaneously, it doesn’t show any result.

But if I don’t have use Multivalue (When I define the “parameter” and add driver to Document in “Document analytical driver”) it works fine. Where is my wrong that I cannot select multi value simultaneously?

Environment Knowage-6_1_1-CE-Installer,knowageReportDesigner-6_1_0,Windows7, Explorer
asked Sep 16, 2018 in Analytical Driver by bahar (730 points)
edited Sep 18, 2018 by bahar | 1 view

1 Answer

0 votes

Hi,

   I think that a problem could be the where condition of the query: if more values are passed it should use the 'IN' operator and not '=' 

Ie: 

SELECT `time` , `name_client` , name
FROM `mornings`
INNER JOIN `users` ON mornings.user_id = users.id where name IN (?)

So, try with this first change...

Hope his help..

answered Sep 17, 2018 by giachino1175 (4,400 points)

Hi Antonella,

Thanks for your response, I made this change but it doesn't change any thing. 

When I have run the report it shows results corresponding to the default value that I have set in parameter definition,  such as fig 1. In this case I didn't select any "owner" when I ran the report 

 fig 1.

If I have select any "owner" at the running time , the report doesn't show any result such as fig 2 .

I must say that when I have added the parameter to the data set it shows me this message 

Please help me ASAP, 

Thanks in advance.

I don't know anymore about that Birt warning...I suggest fyou looking for on Birt forum or documentation.

Instead about us, please check the browser request (F12) just to check the real parameter value that is pass to Birt and check the server logs (knowage, knowagebirtengine).
1,554 questions
1,017 answers
2,037 comments
2,568 users