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)
How to show first two records in TableHeader
Ramprasad
<p>Hi All</p>
<p> </p>
<p>I am getting 100 records from database. If the records first column value is 'Liable', i have to show this record in table header. Remaining records should show in detail row.</p>
<p> </p>
<p>Can any one of you give an example that helps us a lot.</p>
<p> </p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad.</p>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p>
<p> </p>
<p>you can create a variable and in your dataset, on the onFetch event type something like </p>
<pre class="_prettyXprint _lang-">
if(row["?????"] == "?????") {
myValue+=row["????"] + " - "
}
</pre>
<p>Here is a short example based on classic model and made with BIRT 3.7.2</p>
<p> </p>
<p>In this one, if the productline is <strong>Motorcyle</strong>, productname are in the table header otherwise, they are in the detail</p>
<p> </p>
<p> </p>
Ramprasad
<p>Hi GLO_FR,</p>
<p> </p>
<p>Thanks for your quick reply.</p>
<p> </p>
<p>Our requirement is different of your example.</p>
<p>The total detail row should copy as table header row. I am attaching a file please find it.</p>
<p>Table Header Columns</p>
<p>detail row1 (should show as table header base on some condition as mentioned in the above example)</p>
<p>detail row2 (As a detail row)</p>
<p> </p>
<p>Based on table header row(detail row1, i have to calculate % CHANGE FROM CONTROL on Male or Female)</p>
<p> </p>
<p>Thanks,</p>
<p>Rampasad.</p>
GLO_FR
<p>Hi,</p>
<p> </p>
<p>in this caes, it will probably be easier to create and manage 2 separate tables</p>
<p>The first one acts like the header, the second one which have the same size, will act like the detail.</p>
Ramprasad
<p>Hi,</p>
<p> </p>
<p>1.Can we show the same dataset in two different tables? If it is the case, based on one of the columns value in dataSet, we have to show matching rows in table1, and other rows in table2.</p>
<p> </p>
<p>2.Can we do calculation, Based on table1(may contains multiple rows with column ****(M,F) in the given example) data, on every record in the table2.</p>
<p> </p>
<p>Please provide an example to help us.</p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad.</p>
GLO_FR
<p>Hi,</p>
<p> </p>
<p>yes you can use the same dataset in different element (table, chart....).</p>
<p> </p>
<p>I don't think you need to cross table1 with table2 because you are using the same dataset. It means that you have the same data in table1 and table2.</p>
<p>BUT if you still need to do calculation in table2 with element from table1, there is no main problem, but you will probably have to use report or page variables.</p>
Ramprasad
<p>Hi GLO_FR,</p>
<p> </p>
<p>The example is working fine.</p>
<p>But according to your example there should be only one time we are able to show planes at header.</p>
<p> </p>
<p>How ever i have implemented in the same way as you said. I have attached a file.</p>
<p> </p>
<p>In the file, We have Two groups Group1, Group2.</p>
<p>In page1 we have to show Group1 Data only, In page2 Gropu2 data only.</p>
<p>But Both groups data is displayed in every Page. Group2 Data should not display in page1 and Group1 Data should not display in page2. First two rows data is Control group data for calculating aggregation values on remaining rows.</p>
<p> </p>
<p>Please help us to solve this issue.</p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
GLO_FR
<p>Hi,</p>
<p> </p>
<p>It's because you didn't create correctly the filter between the parent and the child table.</p>
<p> </p>
<p>1) Name the "master" table <span style="color:#ff0000;"><strong>parent</strong></span></p>
<p>2) Name the "inside" table <strong><span style="color:#ff0000;">child</span></strong></p>
<p>3) In the property sheet of the child table create a new filter :</p>
<p>Select <strong>GROUP_NAME</strong> (of the child table) <strong>equal to</strong> (open the expression builder) Available Column Bindings > Table - Parent > <strong>GROUP_NAME</strong></p>
Ramprasad
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hi GLO_FR,</span></p>
<p> </p>
<p>Absolutely correct.</p>
<p>I have to implement this using Birt Report Engine API.</p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Thank you very much for your help.</span></p>
<p> </p>
<p> </p>
<p><span>Thanks,</span></p>
<p><span>Ramprasad.</span></p>
Ramprasad
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hi GLO_FR,</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">It becomes difficult for us to calculate <b>Subtraction </b>depending upon the control group values. Please find attachment for resulting output.</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Please help us to solve this issue.</span></p>
<p> </p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Thanks,</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Ramprasad.</span></p>
GLO_FR
<p>Hi,</p>
<p> </p>
<p>you will probably have to type some script and store data in an array, or, if possible work on the query of your dataset.</p>
<p> </p>
<p>I will try to take a look on it</p>