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)
Empty rows in crosstab
Frenkys
Hi,
I am using birt rcp report designer ver 2.6.1 and I can not create a crosstab that show always all the rows even when empty. I searched around but could not find a clear solution that I can use. Can anyone help me?
Thanks,
Frenkys
Find more posts tagged with
Comments
mwilliams
Hi Frenkys,
Are they empty rows that exist in your dataCube? Or are they rows that don't exist because there is no data for them? If the first one, there is an option in the property editor to show empty rows/columns. If it's the second, you'll have to create rows in your data to fill the voids. One way to do so would be to make a scripted dataSet that has all of the values you'll want and join your data to this dataSet so that it for sure has all of these values.
Hope this helps.
Frenkys
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73858" data-time="1298559617" data-date="24 February 2011 - 08:00 AM"><p>
Hi Frenkys,<br />
<br />
... If it's the second, you'll have to create rows in your data to fill the voids. One way to do so would be to make a scripted dataSet that has all of the values you'll want and join your data to this dataSet so that it for sure has all of these values.<br />
<br />
Hope this helps.<br /></p></blockquote>
Yes, it's so; can you show me how to make this scripted dataSet and join it to my sql dataset? But what if I do sums with the results of crosstab? I will not have false results?<br />
Thanks,<br />
Frenkys
mwilliams
What are the empty fields you're trying to show? Dates?
Frenkys
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73866" data-time="1298562766" data-date="24 February 2011 - 08:52 AM"><p>
What are the empty fields you're trying to show? Dates?<br /></p></blockquote>
No, they are classification fields (A,B,C, ecc.).<br />
Thanks,<br />
Frenkys
mwilliams
For a scripted dataSet, you'd simple create a scripted dataSource, then create a scripted dataSet. In your Open script you'd create an array with all of your values in it. In your fetch script, you'd step through the array creating the rows. You can find several examples of creating a scripted dataSet in the devShare. Let me know if you need help with this. You'd then join your new dataSet and your existing dataSet using a joint dataSet. You'd then use computed columns to get your values all lined up for use and to fill in the value for your newly added rows as 0 as to not mess up your calculations. You'd then create your dataCube from this new dataSet and all of your row dimensions should be there. Let me know if you need any help with this. Here is a link to a devshare post that shows how to do the same thing, only with dates.
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1006-add-missing-dates-to-chart-category---table/
Frenkys
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73902" data-time="1298570040" data-date="24 February 2011 - 10:54 AM"><p>
For a scripted dataSet, you'd simple create a scripted dataSource, then create a scripted dataSet. In your Open script you'd create an array with all of your values in it. In your fetch script, you'd step through the array creating the rows. You can find several examples of creating a scripted dataSet in the devShare. Let me know if you need help with this. You'd then join your new dataSet and your existing dataSet using a joint dataSet. You'd then use computed columns to get your values all lined up for use and to fill in the value for your newly added rows as 0 as to not mess up your calculations. You'd then create your dataCube from this new dataSet and all of your row dimensions should be there. Let me know if you need any help with this. Here is a link to a devshare post that shows how to do the same thing, only with dates.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1006-add-missing-dates-to-chart-category---table/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1006-add-missing-dates-to-chart-category---table/</a><br
/></p></blockquote>
Thanks yoy very much for your help!<br />
I have created a scripted dataSource and a scripted dataSet, but I need help for the open and the fetch script; then how does a joint dataSet and how use computed columns?<br />
I know I'm asking too much but can you tell me just links to articles on these topics?<br />
Thanks again,<br />
Frenkys
mwilliams
Did you look at the devShare post above? It has an example that shows how to do all of this just with dates and not with A,B,C, etc.
Let me know if you need help beyond this example.
Frenkys
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73961" data-time="1298649952" data-date="25 February 2011 - 09:05 AM"><p>
Did you look at the devShare post above? It has an example that shows how to do all of this just with dates and not with A,B,C, etc.<br />
<br />
Let me know if you need help beyond this example.<br /></p></blockquote>
Hi Michael,<br />
I think you can help me better with a practical example; I attach a csv file and a report: like you can see only with parameter = 1 you can see all rows of group_b; with other you can see only some row; I would like instead they are all still visible.<br />
You can adjust this report?<br />
Thanks,<br />
Frenkys<br />
mwilliams
Take a look and let me know if you have questions. Be sure to change the location of the CSV file in the dataSource before doing anything with the report.
Frenkys
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73972" data-time="1298656733" data-date="25 February 2011 - 10:58 AM"><p>
Take a look and let me know if you have questions. Be sure to change the location of the CSV file in the dataSource before doing anything with the report.
<br /></p></blockquote>
Hi Michael,<br />
now everything is much clearer to me
<br />
Thanks,<br />
Frenkys
mwilliams
Not a problem. Always glad to help. Let us know whenever you have questions!