Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Join problems
Arne79
Hi all,
this is my first post and i hope it is the right forum. First of all i am relative new to birt and i have a very big problem. i have to use Birt 2.3.1 and create some reports with it. Since some time i have big problems with joined data. I have a scripted data set and a data set which uses a query with binded report parameters. these seperated data sets work very fine. Then i joined these datasets with left outer join with the join wizard. When i preview the query it works very well so i can close the wizard. But then when i go to the outline view and i want to click on the joined dataset the "+" disappear and i am not able to bind some columns to a table or a chart. I have an older joined dataset that works and i built the same dataset again with the same sources and it have the same problem. i do not know what i should do.
Find more posts tagged with
Comments
mwilliams
Hi Arne,
Can you recreate this issue with the sample database and a simple scripted dataSet so that I can see exactly what you're talking about?
Arne79
Hi,
sorry for the late response but i was not in town over the weekend. So i tried a little bit with the sample database and it seem that the problems are the parameters. In the data set which is built with the query i use a query with placeholders "?" and linked them to report parameters. In the preview everythings even the join with this data set works well but outer the join wizard i cannot use this data set.
By the way is there a tutorial where i can find how to make a join with scripting rather then the wizard. i would use global arrays and in the fetch event add an element to this array. But i have problems to define an array as global variable and do not know how to handle when dataset have different numbers of rows. i have to do a left outer join. Perhaps you can give me an advise.
mwilliams
So, were you able to reproduce the error? If so, could you attach a version that I can run? I'm still not sure I'm understanding exactly what's happening.
Arne79
Hi, <br />
i try to explain step by step what i have done with the sample database.<br />
<br />
First i have a dataset with the query: <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select *
from CLASSICMODELS.EMPLOYEES
where CLASSICMODELS.EMPLOYEES.FIRSTNAME like ?
</pre>
<br />
and the parameter is linked to the report parameter which is the String 'Tom'.<br />
<br />
Then i have a scripted dataset. It has only one column where in each row is a number from 5 to 19.<br />
In the open event of this dataset i have:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.setGlobalVariable("timecount", 5);</pre>
<br />
and in the fetch event:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var mh = reportContext.getGlobalVariable("timecount");
if (mh <= 19){
row["mhour"] = mh;
mh++;
reportContext.setGlobalVariable("timecount", mh);
return true;
}else{
return false;
}</pre>
<br />
Then i want to make a join with these data sets on the column 'mhour' from the scripted and <br />
the column officecode from employees. They match the condition with the 6 in one row.<br />
I know that this join does not make sense but it is only an example. How i tell the preview of the join works<br />
but then there is an error. When i replace the placeholder '?' with an value the data set is ok.
mwilliams
I don't get an error, but the field doesn't show up in the bindings. Not until 2.6.0 do the columns that should show show, so it looks like there was a bug in earlier versions.