Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Don't know how to display data as in draft
Omnycron
<p>Hey guys! Currently i am struggling to display data is in the draft which i created in Word. I am working with Birt Designer v4.4.2.</p>
<p> </p>
<p>I have a Dataset with a flat list of dates(classes of one course at an university). Those have to be displayed as seen in the attached file:</p>
<p> </p>
<p>- dates of one calendar week grouped in a row</p>
<p>- details of the date (e.g. room, time when class starts) in the cell</p>
<p> </p>
<p>How can i display those dates in Birt?</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
micajblock
<p>Use inline (exmple here -<a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1098-simple-printed-label-report/).'>http://developer.actuate.com/community/forum/index.php?/files/file/1098-simple-printed-label-report/).</a>If
you have sample data, I can build a quick example. </p>
Omnycron
<p>Thank you very much, using your example i was nearly able to finish the report. But i still haven't understood what setting makes the data in the list displayed to the right, so that Tuesday appears next to Monday etc. Can u tell me? (For this report i copied your example
)</p>
<p> </p>
<p>This question is relevant to the next step in my report. It can happen, that there are multiple Events (lectures) on one day. I have to display all events of one day in the same cell. How can i make this work?</p>
<p> </p>
<p>My first idea was a grouping - but then (see question at top) data for each weekday was displayed one below the other and not monday next to tuesday etc. Can you help me here again?</p>
<p> </p>
<p> </p>
<p>tldr: I need to adapt my current report (see attachements) so that multiple lectures of one day get displayed in one cell in my report</p>
<p> </p>
<p>Attached Files:</p>
<p>currentReport.pdf = How report looks when i run it with my database</p>
<p>ModulplanHochformat.rptdesign = Reportdesign of currentReport.pdf (up to date)</p>
<p>sampledata.csv = sample data for lectures</p>
micajblock
<p>I apologize but my German is limited to 'zwei Bier , bitte'. Can you please show what is the required format? Word, PPT, image, will all work.</p>
Omnycron
<p>Yeah, sorry for that.</p>
<p> </p>
<p>I added a .docx file explaining what is required.</p>
<p> </p>
<p>Actually the look and everything for the report is ok at the moment. The only problem is, to display multiple lectures of one day in one cell. I know i have to use a grouping, but dont know how to.</p>
<p> </p>
<p>Edit: the only thing where i need help atm is the table with lectures (Monday/Tuesday/etc.) ignore that german stuff
</p>
<p> </p>
<p>Edit2: If you are going to wirk with my .rptdesgin file. I want the grouping on the day, so it will have to be grouped on data set row "Datum" (= date).</p>
micajblock
<p>A little bit more complicated than I thought. Attached is a solution that works. There might be better ones. I had to modify your CSV so it is a CSV and not separated by ';'. </p>
<p> </p>
<p>The solution is to create a week number computed column then create a table grouped on that column. with only a group header. In the detail have a grid with 5 columns. In each cell put a table. Each table is filtered based on the outer week number and the day of the week.</p>
<p> </p>
<p>Hope this all makes sense.</p>
Omnycron
<p>Thank you very much, I tried for hours but wasn't even close to your solution!</p>
<p> </p>
<p>Bad thing: Requirements changed. I also need this report in landscape view, can you help me here again? (see attached file)</p>
<p> </p>
<p>Also: Now it is possible that there are lectures on saturdays. As this doesn't happen often I want to hide the entire saturday column if there aren't any lectures. How can i do that?</p>
micajblock
<p>Sorry, it took me a while. Been busy. If you are using a relational database this is easier. The idea is to have 2 data sets. One which I will use to build a cube to create a crosstab. The other I will use to nest a table in the crosstab. In your case:</p>
<ol><li>Create a data set that will be a select distinct on the Lecture Date.</li>
<li>Create computed columns for week number, day number, day name (as in the attached example)</li>
<li>Create a second data set that will have lecture date, start time, end time, lecture name.</li>
<li>Add a where clause - where lecture date=? (you will get a warning which you can ignore)</li>
<li>Create a cube where 1 dimension is the week number, the other dimension is the day number with a display field of display name.</li>
<li>Create a measure from Lecture Date with an aggregation of First.</li>
<li>Create a crosstab with the columns of week number, and the rows of day number, the cell should be the measure order date.</li>
<li>Delete the data item of the measure and then RMB to insert a table (for some reason dragging a table does not work. Make sure it is bound to the secod table. Format it to your liking</li>
<li>Edit the 'Data Set Parameter Binding' in the binding tab property of the table and bind the data set parameter to the measure.</li>
</ol><p> </p>
<p>I hope you can get all you need from this explanation and the example.</p>
Omnycron
<p>Thank you for your help again!</p>
<p> </p>
<p>This time I got an error using your explanation:</p>
<p> </p>
<p>Everything worked fine untill step 8 & 9. As you can see in file2.pdf the crosstable works with WeekNumber as columns and WeekDay as rows and the measure as data. But If i add the table is described in your steps it won't work. I dont get any data displayed. The data set rows seem to be empty (table header is displayed correctly)</p>
<p> </p>
<p>My assumption is, that there seems to be a problem with the sql statement for my dataset Data Set For Table. In addition to the warning of step 4 I also get an unexpected Exception (see excpection.txt)</p>
<p> </p>
<p>This is the SQL-Statement of my data set</p>
<p> </p>
<div>select t.Datum as LectureDate, t.StartUhrzeit as StartTime, t.EndUhrzeit as EndTime, t.Klausur as IsTest</div>
<div>from vvs.termin t</div>
<div>where t.LectureDate = ?</div>
<div> join (select * from vvs.vorlesung v where v.Semester = ?) as tmp1</div>
<div> on t.Vorlesung = tmp1.ID</div>
<div> join (select * from vvs.kurs k where k.ID = ?) as tmp2</div>
<div> on tmp2.ID = tmp1.Kurs</div>
<div> </div>
<div>This statement succesfully previews data as long as the entire line 3 "where t.LectureDate = ?" is deleted.</div>
<div> </div>
<div>I added the rptdesign file as attachement if the source of the error might be somewhere else. I think i translated everything relevant in english. </div>
<div> </div>
<div>Also: Does this support 2 Lectures in one cell as in the other report?</div>
<div> </div>
<div> </div>
micajblock
<blockquote class="ipsBlockquote" data-author="Omnycron" data-cid="135235" data-time="1428440693">
<div>
<p><span style="font-size:12px;">select t.Datum as LectureDate, t.StartUhrzeit as StartTime, t.EndUhrzeit as EndTime, t.Klausur as IsTest</span></p>
<div>from vvs.termin t</div>
<div>where t.LectureDate = ?</div>
<div> join (select * from vvs.vorlesung v where v.Semester = ?) as tmp1</div>
<div> on t.Vorlesung = tmp1.ID</div>
<div> join (select * from vvs.kurs k where k.ID = ?) as tmp2</div>
<div> on tmp2.ID = tmp1.Kurs</div>
<div> </div>
<div>This statement succesfully previews data as long as the entire line 3 "where t.LectureDate = ?" is deleted.</div>
<div> </div>
<p> </p>
</div>
</blockquote>
<p>The where clause needs to be after all the joins. Also I do not think you need any of the joins as you are filtering on the lecture date anyway.</p>
Omnycron
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="135237" data-time="1428441647">
<div>
<p>The where clause needs to be after all the joins. Also I do not think you need any of the joins as you are filtering on the lecture date anyway.</p>
</div>
</blockquote>
<p> </p>
<p>Positioning the where clase after all the joins had no impact. I stell get the exception and there is no data displayed.</p>
<p> </p>
<p>The joins are neccesarry because there are multiple courses in my database. It can happen that course A has a lectuare at 07.04.2015 9:00am and course B has a lecture at the same time. So I cant just filter on date.</p>
micajblock
<p>My bad, it needs to be </p>
<pre class="_prettyXprint">
where t.Datum = ?</pre>
Omnycron
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="135239" data-time="1428443484">
<div>
<p> </p>
<p>My bad, it needs to be </p>
<pre class="_prettyXprint">
where t.Datum = ?</pre>
</div>
</blockquote>
<p>I am feeling pretty dumb right now..</p>
<p> </p>
<p>Thanks again!</p>
Omnycron
<p>I got one more (hopefully the last) question to those 2 reports. In need to display the date of the day in both reports. The problem is that there isn't a lecture each day. How can i realize this? </p>
<p> </p>
<p>(See empty cells in attached report)</p>
micajblock
<p>If there is not lecture that day then the inner table should be empty. I am not sure what the problem is. </p>
Omnycron
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="135389" data-time="1428693769">
<div>
<p>If there is not lecture that day then the inner table should be empty. I am not sure what the problem is. </p>
</div>
</blockquote>
<p>Yeah exactly. The requirement is to display the date anyways. I always have to display a date, even if there is no lecture.</p>
<p> </p>
<p>I also got a new issue: it can happen, that the time period is over to years (2014/10/30 - 2015/02/23). Then the grouping for calendar week in my crosstable won't work correct. </p>
micajblock
<p>In the cell you can put both the date from the cube and the inner table.</p>