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)
Show empty columns grayed out
Rob77
Hello,<br />
like in this link: <a class='bbc_url' href='
http://www.birt-exchange.org/forum/designing-birt-reports/13037-crosstab-show-empty-rows-columns-greyed-out.html'>http://www.birt-exchange.org/forum/designing-birt-reports/13037-crosstab-show-empty-rows-columns-greyed-out.html</a><br
/>
But I have similar problem reproducible with already posted csv_test.rptdesign (<a class='bbc_url' href='
http://www.birt-exchange.org/forum/attachments/designing-birt-reports/1078d1248852169-hide-chart-conditionally-csv_test.rptdesign'>http://www.birt-exchange.org/forum/attachments/designing-birt-reports/1078d1248852169-hide-chart-conditionally-csv_test.rptdesign</a>)
(I may have locally modified version, if that one doesn't work).<br />
<br />
Problem:<br />
- show empty columns in crosstab properties empty rows/columns stays grayed out<br />
<br />
Why I need this functionality:<br />
- I choose parameters as column values. It is possible that there are no data for some of them. I still want the columns to be displayed, even if empty.<br />
<br />
BIRT version: 2.3.2<br />
<br />
Please let me know if I have to check anything or should provide additional details.<br />
<br />
Regards,<br />
Robert
Find more posts tagged with
Comments
mwilliams
Hi Robert,
In the example of that that I still had in my workspace, the only dimension that had the option to "show if empty" was fuel, and I was able to select that. Can you explain more about the situation in which you'll have empty columns? Can you attach a CSV file that has the data how it'll be for you when you've got an empty column? Thanks.
Rob77
Sure,
here's the attachment. As you can see, there is no data for Warsaw/2008-01.
So when I choose in parameters:
Warsaw+London
2008-01,2008-02,2008-03
Unleaded+Normal
I have three output columns.
When I change city parameter to Warsaw, I have two output columns (2008-01 is missing). But I would like to display this column even if no data.
Is it possible?
Regards,
Robert
mwilliams
Robert,
In your case, where you're not using a real date field, you'll have to have the line in the database like:
"Warsaw","Unleaded","2008-01",
to get it to show up. If you were using an actual date field where BIRT knew there was a value not showing, you'd be able to include it, I think.
Hope this helps.
Rob77
Thank you for your answer.
Unfortunately there are three issues:
1. All fields are taken from database, not CSV file
2. I didn't know that data format would matter. Actually for some reports I use date formatted as in example, for other reports there are completely different things, like software version: "2.6.1", "2.6.2", "2.6.3", and so on.
3. First I select from database potential columns and rows values as parameters. Then in the cross tab data set I have something like:
SELECT <columns> [...] WHERE <column_value> in parameters value.
What do you think? Is it possible to include empty columns whatever is their format?
Regards,
Robert
mwilliams
Robert,
One way you can do it...at least with the example we've been working with....is to create a joint dataSet with the DateDataSet and the main dataSet. Do a full outer join on the date field. Create your dataCube using this dataSet and use the new date column as your dimension. This automatically puts that date in. This is with all three selected. Most likely, you'll have to create another DateDataSet that isn't used for the parameter, but is limited by the parameter and then join that new dataSet with the main dataSet as described above. Let me know if you have questions.
Rob77
Thank you very much again.
I got your idea, however I would need some time to implement it and see how it works.
Regards,
Robert
Rob77
Confirmed, it works like a charm.
And wasn't particularly hard. Basically I just had to replace all inner joins:
SELECT date, fuel, price, city from dates, prices, cities, fuels
WHERE date.id = prices.date_id
AND fuel.id = prices.fuel_id
AND .......
(WHERE ...) with LEFT JOINS, like
SELECT date, fuel, price, city from dates
LEFT JOIN next table
LEFT JOIN next table 2
...
Regards,
Robert
mwilliams
Robert,
Excellent. Glad I could help.