[Logo] SpagoWorld Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Groups] Back to home page  [Moderation Log] Moderation Log   [Register] Register /  [Login] Login 
How to implement in SpagoBI Server a BIRT report parameter that allows multiple values [SOLVED]  XML
Forum Index » Technical Help - SpagoBI Server - REPORTING
Author Message
sd.spw

Newby

Joined: 14/12/2015 10:55:15
Messages: 10
Offline

Hi guys
do you have any solution for the queries written in spagoBi studio birtReport and uploaded on spagoBi server. as i made the report in studio and uploaded on server but not able to set the multiple parameters in server. the report is working correctly in studio with multiple parameters but not working in server with multiple parameter.


Pls provide a solution on this.
Thanks in advance
abdur.rahmaan.m.spw



Joined: 23/06/2016 14:19:06
Messages: 8
Offline

Hi,

I am using spagobi studio 5.2 and spagobi server 5.2. In my case, i need to pass characters as a multi values (for eg: 'Product','terms','parts',.....) instead of id's... I followed the aghedin steps but i got the error as below ,my parameter name is CategoryLev1 and i need to filter on the column named CategoryLev1.

The following items have errors:

ReportDesign (id = 1):
+ There are errors evaluating script "this.queryText = this.queryText.replace(CategoryLev1, " CategoryLev1 in (' "+params["CategoryLev1"].value+" ') ");
":
Fail to execute script in function __bm_beforeOpen(). Source:
------
" + this.queryText = this.queryText.replace(CategoryLev1, " CategoryLev1 in (' "+params["CategoryLev1"].value+" ') ");
+ "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "CategoryLev1" is not defined. (/report/data-sets/oda-data-set[@id="58"]/method[@name="beforeOpen"]#1).

And the sql dataset on spagobi studio is,

select m.country,tp.CategoryLev1 ,tp.CategoryLev2,m.sentiment,
(case when m.sentiment=1 then 'S1' when m.sentiment=2 then 'S2'
when m.sentiment=3 then 'S3' when m.sentiment=4 then 'S4' end) as rating
from mentionmysql.topic tp
join mentionmysql.master m on m._id=tp._id
where m.Country like ?
and m.MentionCreatedDate between str_to_date(?,'%d/%m/%Y') and str_to_date(?,'%d/%m/%Y')
and CategoryLev1

Can anyone help me to resolve this.

Regards,

Abdur Rahmaan
abdur.rahmaan.m.spw



Joined: 23/06/2016 14:19:06
Messages: 8
Offline

Hi,

I am using spagobi studio 5.2 and spagobi server 5.2. In my case, i need to pass characters as a multi values (for eg: 'Product','terms','parts',.....) instead of id's... I followed the aghedin steps but i got the error as below ,my parameter name is CategoryLev1 and i need to filter on the column named CategoryLev1.

The following items have errors:

ReportDesign (id = 1):
+ There are errors evaluating script "this.queryText = this.queryText.replace(CategoryLev1, " CategoryLev1 in (' "+params["CategoryLev1"].value+" ') ");
":
Fail to execute script in function __bm_beforeOpen(). Source:
------
" + this.queryText = this.queryText.replace(CategoryLev1, " CategoryLev1 in (' "+params["CategoryLev1"].value+" ') ");
+ "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "CategoryLev1" is not defined. (/report/data-sets/oda-data-set[@id="58"]/method[@name="beforeOpen"]#1).

And the sql dataset on spagobi studio is,

select m.country,tp.CategoryLev1 ,tp.CategoryLev2,m.sentiment,
(case when m.sentiment=1 then 'S1' when m.sentiment=2 then 'S2'
when m.sentiment=3 then 'S3' when m.sentiment=4 then 'S4' end) as rating
from mentionmysql.topic tp
join mentionmysql.master m on m._id=tp._id
where m.Country like ?
and m.MentionCreatedDate between str_to_date(?,'%d/%m/%Y') and str_to_date(?,'%d/%m/%Y')
and CategoryLev1

Can anyone help me to resolve this.

Regards,

Abdur Rahmaan
Juro94.spw

Newby

Joined: 06/07/2016 14:06:25
Messages: 23
Offline

Hello abdur.rahmaan.m.spw
I am facing same problem. Did You solve it?
Best regards!
abdur.rahmaan.m.spw



Joined: 23/06/2016 14:19:06
Messages: 8
Offline

Hi follow this link where I have posted the same question on BIRT forum and got the answer.
http://developer.actuate.com/community/forum/index.php?/topic/39365-passing-multiple-values-on-single-parameter/

Let me know if you still have the problem,

Regards,

Abdur Rahmaan
Juro94.spw

Newby

Joined: 06/07/2016 14:06:25
Messages: 23
Offline

I m trying to do it. But I have an error.

My data set is


before open script


My parameter is string textbox

When I run my report in studio, I am getting this error
org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details: Failed to prepare the query execution for the data set: Data Set Cannot set the string value (Gdansk) to parameter 1.


Could You please help me?
rafiq.anjum.spw

Newby

Joined: 10/08/2016 16:55:12
Messages: 12
Offline

Hi,

I am also facing such problem of parameter multiple values. my report is working perfect in Spagobi Studio. When i run this report it first shows me the list of Ids whatever i select it give the reports of selected ids. Kindly advice me after deployment of spaogbi server what steps should i follow to run this report same like which run on studio , mean frist show me list list of IDs after selection IDs i can get the report of selected IDs. I tried with report on Spagobi using as per advice using $User_profile_attribute in LOV when define Select query and with Select Query it is given .. but may be this option is when u already saved vales in $user_profile_attribute or i cant not use it as per my reuirement. but my requiremnet is as i click on the report which is downloaded from spagobi Stuio on server. first is show the list of Ids using Analitical Driver /LOV ...sure when execute this report first it show the list will come from dataset then I select IDs from this list and get the report of selected Ids.

Kindly advice me what steps should i follow on server to get required result...

regards
rafiq
vinaydevatha.spw



Joined: 08/08/2016 09:46:08
Messages: 3
Offline

I have issues in passing multiple values to a parameter. My case is as below:

a) My dataset table is returned from a query
{call product_rmc_summary1(?,?)}

b) 'Product' is a column in the table values returned by this query on which I want to set a filter with ability to choose multiple products at a time.

I did the following:
a) Created a parameter by name 'product' in spagoBI studio with datatype as 'String' and display type 'Text Box'
b) I created filter on dataset with IN operator.
row["product"] IN params["product"].value

b) In SpagoBI, I created LOV which reads data from the same table for list of unique products and then created a string type analytical driver based on this LOV with default as pick up LOV's firs item.
c) When I run the report with this, no data is returned. Only blank template is coming up.

I cannot use the suggestions made by a few in this forum, to replace the query text as the query itself does not use the 'product' parameter - but only filter of the dataset uses it.

Pls help how to configure this.



Regards,
Vinay
anil513.spw



Joined: 06/08/2016 13:42:07
Messages: 2
Offline

Finally 3 days of effort gave me the solution to the MultiSelect parameter in spagoBI server 5.1
1. I have written this query in this dataset
select products.productLine, SUM(QUANTITYORDERED*PRICEEACH) as Sales
from PRODUCTS,ORDERDETAILS
where PRODUCTS.PRODUCTCODE = ORDERDETAILS.PRODUCTCODE

2 . Now click on script tab of the above dataset and select beforeOpen. and i have written this script
this.queryText = this.queryText + " and products.productLine in (" + params["pProductLines"].value + ") group by products.productLine";

Note: pProductLines is the paramater name, data type = String, Display type = Text Box

3. while assigning analytical driver to the document check multivalue option in server.

any queries: anil.bairy@altruistindia.com
petabera.spw



Joined: 12/04/2017 16:37:16
Messages: 1
Location: UAE
Offline

Thanks all for

Here is some good looking hairstyles for guys
[WWW]
nishant.bahikar.spw.spw



Joined: 20/06/2017 09:47:52
Messages: 4
Offline

Hello all,

Was going through the same issue then later found out that problem was that
multivalue was passed as a sing varchar string along with comma.

so i modified my dataset and it worked

Older dataset -
[
select * from tablename where column in (?)
]
-- a, b

New dataset -
[

select * from tablename where column in
(select
regexp_split_to_table
(
( select replace ( (?::varchar),'"','') as a ), E',') as C )

]

-- ?::varchar -- it should be of type varchar
-- replace " with blank as when we select radio button or list it adds up " by itself ( not required for manual input parameter )
-- split values in multiple rows seperated by ,
-- mydatbase was postgres

Thanks ,
Nishant Bahikar


lisa keightley.spw



Joined: 27/09/2017 07:38:09
Messages: 1
Offline

nice post.
 
Forum Index » Technical Help - SpagoBI Server - REPORTING
Go to:   
Powered by JForum 2.1.9 © JForum Team