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)
Hyperlinking the data between tables in a page
sumathra
<p>As a newbie of birt, I am stuck up with the task of displaying the data between the tables in a page.</p><p>problem is, I couldn't get the hyperlink of the data in a particular tab off table and populate the relevant data in the following table placed below the parent table~!!</p><p> </p><p>I have attached a sample image, to explain what I am in need exactly..</p><p>There you go!!</p><p>In that image, When I click over the HIGHWAY row, the related data of that row is populated in the new table beneath the old one in the same page...</p><p>Could you please let me know how to attain such operation in a report. Could you please produce sample database report.</p><p>Thanks in advance!</p><p> </p>
Find more posts tagged with
Comments
mwilliams
<p>You could either use a drill through to reload the report and use a parameter to determine what data to show below the top table. Or you could create a grouped table below the first table, grouped on your field from the top table. Then, you'd use client side script in HTML text boxes to determine what group from the second table to show when a hyperlink is clicked.</p><p> </p><p>Hope this helps. If you need an example, let me know your BIRT version.</p>
sumathra
<p>Thanks for your useful reply. It helped me a lot.. Looking forward for your sample DB report.</p><p>My BIRT version is 4.2.2.!</p>
abhiallen
<p>Hello guys,</p><p> </p><p>I found this thread while searching the forum, I am trying to do something on the same lines.</p><p> </p><p>I have table A which shows higher level data with each row for specific category </p><p>Table B below table A is a drill down data for all the rows in master table A. I want something where if i filter Table A, then based on the filtered rows of A, the data in Table B changes dynamically.</p><p> </p><p>something like filtering of table A, would give us a list of row IDs which will generate the data in table B for those row IDs. I found this interesting : "[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]Or you could create a grouped table below the first table, grouped on your field from the top table. Then, you'd use client side script in HTML text boxes to determine what group from the second table to show when a hyperlink is clicked.[/color]"</p><p>I am using BIRT designer professional version: 11.0.4 build: 20120420</p>
mwilliams
<p>Here is an example that uses client-side javascript to show the appropriate detail section. Hopefully this helps.</p>
sumathra
<p>Thank You So much!!!!!!!!!!!!!!!!</p><p>I got another question too, please notice this too...</p><p>Okie, Let me explain,....</p><p> </p><p> </p><p>I need to display 12 months in the X axis of a line chart... But now I could populate only a couple of months in the X-Axis, since only those values are in db and the Rest are null.Other than those couple of months, not even the "month name" is displayed in the chart.</p><p>Looking forward your valulable answer.</p><p> </p><p>Thank You!.</p>
abhiallen
<p>mwilliams,</p><p> </p><p>thanks for replying with the example report. Although this report explain the client JS based dynamic report data manipulations. But the report i am building is little complicated, instead of show and hide hyperlink, if user filter table A content and resulting rowIds list will determine the content of the detail table B.</p><p> </p><p>Is it possible to dynamically execute the SQL with these filtered rowid list for table A to get get the content of table B.?</p><p> </p><p> </p><p>Appreciate any help!</p>
mwilliams
<p>sumathra,</p><p> </p><p>In the chart, are you using a category axis? If so, you could uncheck that and set your chart to show a scale of the last 12 months. If that doesn't work, you'll need to create a dataSet that has row data for each of the last 12 months represented. Then, you can join that dataSet with your current dataSet to make sure that all months needed are represented and use that dataSet for your chart.</p><p> </p><p>Hope this helps.</p>
mwilliams
<p>abhiallen,</p><p> </p><p>Can you explain your issue with sample data scenario? That might help me to understand the exact scenario to be able to help with an example.</p>
sumathra
<p>Thanks for your valuable solution for my issue.It was helpful.</p><p> </p><p>Again, I got a doubt in hyperlink(first post), so I have created as sample db according to my requirement, but I couldn't get the desired output.</p><p>My first question is,</p><p> </p><p>I have two tabs, when I click over the second tab, the data in the second tab is not getting changed..</p><p>When I click the product line, DRILL DOWN is shown. But my requirement is that, It(DRILL DOWN) should be hidden while nothing has been selected n the product line.</p><p> </p><p> </p><p>Second Query is:</p><p>When I select the month parameter(eg. OCT 2004), It has to compare it along with previous year's same month( I mean OCT 2003) and also last month of the same year(i.e, SEP 2004).. Also the corresponding name has to be populated in the respective column</p><p>its urgent needed...</p><p> </p><p>if u have doubt kindly refer first post (image) for u r reference...and samble db ...</p><p> </p><p>kindly provide solution by sample db....</p>
sumathra
<p>kindly reply for this post...</p><p> </p><p> </p><p>thank in advance</p>
mwilliams
<p>For the first part, you're not wanting the second section to show at all until a product line is clicked? Or you're wanting the data shown in the different tabs to be independent? Let me know. The second part will likely just be about changing the query and writing expressions for the column labels. I'll look closer at that after I hear about the first part.</p>
sumathra
<p>Thanks for your reply, Williams.</p><p> </p><p>As you asked,</p><p>1. YES, I want the second section to show at all until a product line is clicked.!!</p><p>And also YES, I want the data shown in the different tabs to be independent.!</p><p>Hope these information helps you to figure out my second query too!</p><p>Really in need, please.</p><p> </p><p>Thanks in advance!</p>
mwilliams
<p>Take a look at this. It takes care of being able to choose different product lines for each tab and the visibility of each table in the second section depending on if a value is chosen for that tab. It also takes care of the column names to give you the correct header values. All you should need to do is get the correct data to show up in each column, now. I set the parameters to required and gave them all default values, so be sure to run it in the web viewer, not preview. There is a bug with default values in the preview, it seems.</p><p> </p><p>Hope this helps.</p><p> </p><p> </p>
404040
<div style="margin-left:39px;"> </div><p> </p><p>thank for useful report....</p><div>mwilliams..</div>
sumathra
<div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">Thanks for reply, yet again....</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;"> </div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">AS a newbie of BIRT again it's troubling a lot..... I ran a report which u gave, but there is no change(don't know where went wrong), </div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">Example:</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">It works well for VERTICAL tab.</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">But when i click over the second tab(ABCPD) again it's rerunning to the VERTICAL TAB, it couldn't be fixed for selecting productline.</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">* productline and label expression showing at time of click is useful, thanks again!!!</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;"> </div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">If u give with data for label change it will be helpful too and i have tried in before open, but it couldn't display anything when i click the parameter of month i don't know how to change query for each month....i have attached report which i have tried...but no result just correct it reproduce it...</div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;"> </div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;"> </div><div style="margin-left:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">thank in advance...</div>
mwilliams
<p>The report I attached worked separately for the different tabs. I didn't change it to make the current tab be the current tab still on reload, but the correct data is in the correct tab, except for the month data. The labels should be changing properly though. Are you not seeing all of this?</p>
sumathra
<p>Ouch!! Sorry, it's working fine, I missed it.
I am here with another query in the same report.
i dono how to frame query for changing parameter of month. And also i tried with computed column but no result in that too.. so please add data for column and run it by parameter. its useful for me to do my report..i have attached a sample db for reference...</p><p> </p><p>thank in advance...</p>
sumathra
<p>Really in need, your absence is annoying me alot.</p><p>Hope you will revert back soon..Looking forward!!</p>
mwilliams
<p>One option would be to write a query like this only use parameters for the dates.</p><p> </p><p></p><pre class="_prettyXprint _linenums:0">select distinct productline as StringFact,'all dates' as separatecolumns,sum(CLASSICMODELS.PRODUCTS.QUANTITYINSTOCK + CLASSICMODELS.PRODUCTS.BUYPRICE) as BUY,sum(ORDERDETAILS.QUANTITYORDERED * ORDERDETAILS.PRICEEACH) as MSRP from customers, orders, orderdetails, productswhere customers.customernumber = orders.customernumberand orders.ordernumber = orderdetails.ordernumberand orderdetails.productcode = products.productcodeGroup By productline union all select distinct productline as StringFact,'previous year' as separatecolumns,sum(CLASSICMODELS.PRODUCTS.QUANTITYINSTOCK + CLASSICMODELS.PRODUCTS.BUYPRICE) as BUY,sum(ORDERDETAILS.QUANTITYORDERED * ORDERDETAILS.PRICEEACH) as MSRP from customers, orders, orderdetails, productswhere customers.customernumber = orders.customernumberand orders.ordernumber = orderdetails.ordernumberand orderdetails.productcode = products.productcodeand orders.orderdate between '2003-02-01' and '2003-02-28'Group By productline union all select distinct productline as StringFact,'chosen month' as separatecolumns,sum(CLASSICMODELS.PRODUCTS.QUANTITYINSTOCK + CLASSICMODELS.PRODUCTS.BUYPRICE) as BUY,sum(ORDERDETAILS.QUANTITYORDERED * ORDERDETAILS.PRICEEACH) as MSRP from customers, orders, orderdetails, productswhere customers.customernumber = orders.customernumberand orders.ordernumber = orderdetails.ordernumberand orderdetails.productcode = products.productcodeand orders.orderdate between '2004-02-01' and '2004-02-29'Group By productline union all select distinct productline as StringFact,'previous month' as separatecolumns,sum(CLASSICMODELS.PRODUCTS.QUANTITYINSTOCK + CLASSICMODELS.PRODUCTS.BUYPRICE) as BUY,sum(ORDERDETAILS.QUANTITYORDERED * ORDERDETAILS.PRICEEACH) as MSRP from customers, orders, orderdetails, productswhere customers.customernumber = orders.customernumberand orders.ordernumber = orderdetails.ordernumberand orderdetails.productcode = products.productcodeand orders.orderdate between '2004-01-01' and '2004-01-31'Group By productline</pre><p> </p><p>Then, you could use a scripted dataSet to separate the single columns into multiple columns for use in your tables based on the string value column I created in the query. There might be a better way to do this all in SQL. I'm not sure.</p>
sumathra
<p>Please don't get annoyed with my questions, since I am a newbie to BIRT, only with a little idea I am working.. Hope you don't mind.
I followed up your previous post from that I have obtained few ideas and tried to create 'join dataset' and also passed parameter in 'before open' of dataset but it displayed nothing in report. So if you provide sample report, it will be very useful for me to do my reports. I am stuck up in this area for more than a week. My only hope is your reply.
Thank in advance!!</p>
sumathra
<p>Expecting your REPLY ASAP!!</p><p>I have skipped this report for the time being, since I can't go ahead without your valuable reply.</p>
mwilliams
<p>Take a look at this modified version of your report. I slightly modified the query and added script to each of the original three dataSets.</p><p> </p><p> </p>
sumathra
<p>thank u so much mwilliams........its work fine.....</p><p> </p><p> </p><p>thank u once agian...</p>
mwilliams
<p>Great to hear! Let us know whenever you have questions!</p>
sumathra
<p>Hi ,sorry to disturb once again with same question its all working fine with[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;] separately for the different tabs. but now i have to change[/color][color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;] current tab to be the current tab still on reload ?[/color]</p><p> </p><p><span style="font-size:14px;">for example:</span></p><p> </p><div style="margin:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">It works well for VERTICAL tab.</div><div style="margin:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">But when i click over the second tab(ABCPD) again it's rerunning to the VERTICAL TAB...</div><div style="margin:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;"> </div><div style="margin:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;">[color=rgb(0,0,0);font-size:14px;]how to over come this i had tried with Window URL but no result i have attached a sample db for u r reference ..kindly provide solution for this..[/color]</div><p> </p><p> </p><p> </p><p> </p><p>[color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:14px;]thank u in advance[/color]</p>
mwilliams
<p>You should just be able to create a parameter in the report and pass it through your drill-through which table you clicked in. Then, you'd set your section display style based on this new parameter vs having a default "No display" and a default "block" for your display settings.</p>
sumathra
<p>thank for reply could u provide sample-db.....its help to work on my report</p><p> </p><p> </p><p>thank in advance</p>
mwilliams
<p>Take a look at this. It's a modified version of one of the previous reports you sent me. It should do what you're wanting. The display property for all tables starts as block. Depending on the value of the tab parameter will determine which table shows. It also will change the default setup of the tab style if a value from tab2 is selected.</p><p> </p><p>Hope this helps.</p>
sumathra
<p>thank u ......its working as exactly...</p>
mwilliams
<p>Great! Glad to help!</p>