Home
Analytics
BIRT Interactivity Report with dynamic row creation
pm.nayak84
Hello Eevryone,
We were using Actuate 11 as our reporting platform , then we planned to move to interactivity reports . We had few requirements for which one of the Actuate Coroporation member had helped in POC .
I am new to birt and need help in creating some customized fuctionality which will involve calling external java functions
First requirement is :
Report header currency symbols and currency values every page of the report as a row . The of currency and its corresponding values are dynamich as it depends upon the data generated for the report for
a particular day .
We will have a control called as "AddRow" towards right of currency values , when clicked its going to add another row with same values below the first line and all currency values are editable . user can modify and click on the calculate fieldp resent towards right which makes the amount column to get recalculated with new currency values .
It will be great if the solution can be provided which will not involve report submission.
USD 50.30 GBP 68.49 CAD 46.00 INR 48.90 AddRateButton calculatebutton
USD 49.30 GBP 60.49 CAD 46.00 INR 48.90 - editable row added on clicking "Add Row " button
Customername Currency amount
x USD 12345
x USD 13467 - calculated values added below original
y GBP 123.456
y GBP 100.23
z CAD 500
z CAD 500
I INR 389
I INR 389
I will add the image of requirement , till then if anyone can think about it , help me in acheiving the same
Find more posts tagged with
Comments
mwilliams
Ok, for the first requirement, you need to be able to dynamically show a different currency symbol based on the currency type? Is this correct? Please let me know.
As for the second feature, would there be an option to add a row under each row of your table or just the last row? Can you explain more about the calculation that will be done? Thanks.
pm.nayak84
Hi ,<br />
<br />
I am attaching the sample report Layout .<br />
<br />
Requirements are as below <br />
<br />
<strong class='bbc'>ADD RATES: </strong><br />
1) When the user clicks the ?Add Rate? button, assign a number to the new Rate Key: Rate 1 and Rate 2. <br />
2) When the user clicks the ?Add Rate? button, a ?Rate 1? box displays beneath the ?End of Day Rate? key.<br />
3) When the user clicks the ?Add Rate? button again, a ?Rate 2? box displays beneath the ?Rate 1? box.<br />
4) When the user has added 2 rates, the ?Add Button? is disabled so the user is prevented from adding any more rate keys.<br />
5)The?Rate #? Key remains at the top of the report until the user decides to remove the added rate. <br />
6)The ?Rate #? box displays on each page of the report.<br />
7)Add an ?Update Balances? link to the right of the ?Add Rate? button<br />
8)The ?Update Balances? link is inactive (grayed out) until the user adds the first rate.<br />
9)When the user clicks the ?Add Rate? button, a new row appears for the following balances: <br />
Closing Ledger<br />
Closing Available<br />
Opening Available<br />
10) The added USD Equivalent balances display beneath the original USD Equivalent row, designated by USD1 and USD2 in the currency code fields<br />
<br />
Basically the the newly added rate tables can be edited to enter a user requested FX rate values and on clicking the update balance link , report should add new calculated balance values using the entered new FX rate values in the rate1 and rate 2 table and display accordingly .<br />
<br />
Do let me know if the above lines give an clear idea of requirement .
mwilliams
I have not done anything like this before, but from the sounds of it, you could probably use the JSAPI to embed your report into a web page that has the "Add Rate" form, then depending on the inputs from your "Add Rate" form, you could use the JSAPI to update the report window.
Another, non JSAPI, approach could be to use HTML to create a form in a HTML type text box and use a submit button to update the report. This way may require that you re-run the entire page, not just the report window.
pm.nayak84
We are looking for a solution which will not involve rerunning of the report .We are trying to avoid rehitting the database upon each submit .
Is it possible for you to guide me with some more information on using JSAPI . Could you please let me know if the requirement mentioned by me is really possible to develop using BIRt . If yes how complex it is going to be .
Meanwhile i am trying to contact the person who had presented the session for us on birt capability from Actuate corporation and told us that he will be presenting the POC report .
Lincensing talk is almost finalised so i am just worried on the sample report and technical aspects . If someone can guide us on these complex coding aspect , it would be a great help for us to start up with other reports .
mwilliams
Send me some data and I'll see if I can put a little something together. You don't need these entries to be pushed back to the database, right? You just need them displayed in the current report?
pm.nayak84
Hi ,
The user provided new rate values don't need to be pushed back to database . It will be used only to calculate new values and creation of new row on the report .
Do let me know ...if you need more information from myside .
It would be really great help if you can guide us for the report we are trying to built .
pm.nayak84
Hi ,
I don't understand the above lines .
mwilliams
Sorry, that was a spam post. It's gone now. Let me take a look at using a form to hide show a row to a table, how you're wanting.
pm.nayak84
Hi ,
Thanks a lot for looking into this requirement .
it would be really helpful if you can guide us here .
mwilliams
Here's kind of a rough start to what I was thinking. With some work, this can be cleaned up a lot, I'm sure.
Jayram Rout
Hi Williams,
I am from the same group to which Priya belongs to . Could you please say what this JSAPI is and how to use it..And which approach is better..whether to go with JSAPI or will plain JavaScript which you have written in the above file. And is there a way we can use jQuery to manipulate the fields for BIRT.
Jayram Rout
anyways...I add the below tag to the existing script and its works !!!
<script src="
http://code.jquery.com/jquery-latest.js"></script>
;
mwilliams
Great! If you're just needing to do something like what I did in my example, it's probably just easiest to do it like that. If you're wanting to know more about the JSAPI, take a look at
http://www.birt-exchange.org/org/wiki/index.php?title=GSG:Getting_Started_with_BIRT_JavaScript_API
.
Jayram Rout
But my approach of using the jQuery in the Text(HTML) does not work in Web Viewer. But it works in HTML Viewer. Below is the code snippet I have used in the Text Field by choosing HTML from the drop down.
<script src="
http://code.jquery.com/jquery-latest.js"></script>
;
<script type="text/javascript" language="javascript">
var $ = jQuery.noConflict();
$(document).ready(function() {
$("#B_Customer").click(function(){
$(this).html("PNC Customer");
});
$("#HTMLControl_255_1").click(function(){
?$(this).html("Again Click");??????
});
});
</script>