Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Button in a BIRT report
Button in a BIRT report [message #870975] Thu, 10 May 2012 12:40 Go to next message
nlajka - is currently offline nlajka -
Messages: 61
Registered: April 2011
Member
Hello,

I am creating a simple report that how same listings and links in it and would like to add a button onto it so the user can click on it in order to refresh it.

I am aware of the script that does automatic refreshing (http://www.eclipse.org/forums/index.php/mv/tree/163879/#page_top), but I don't know how to create a button that would work as a "refresher".

Thanks!
Re: Button in a BIRT report [message #871064 is a reply to message #870975] Thu, 10 May 2012 17:25 Go to previous messageGo to next message
nlajka - is currently offline nlajka -
Messages: 61
Registered: April 2011
Member
Can anybody say is it possible to have something like that on the report or not?

Is this script usable in some way? What has to be changed in order to make it work/do what I need? Obviously time should be close to 0 in order to make it look like it is working instantly, but how to make it work on a users request?

Thanks.


<form name="input" onSubmit="return reloadPage();">

<script type="text/javascript">


function reloadPage() {
//alert("Reload time");
var temp = new String(location.href);
var targetURL = new String();

if(temp.indexOf("__overwrite=") != -1 ){
targetURL = temp.substring(0, temp.indexOf("&__overwrite") -1);
}else{
targetURL = temp;
}

targetURL += "&__overwrite=true";



//alert( targetURL );
location.replace(targetURL);

return false;
}

timer=setTimeout('reloadPage()', 60000);
</script>



</form>

[Updated on: Thu, 10 May 2012 17:27]

Report message to a moderator

Re: Button in a BIRT report [message #871081 is a reply to message #870975] Thu, 10 May 2012 18:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

There is a button example in that thread.
Add a text element to the report, set its type to html and put in:

<form name="input" onSubmit="return reloadPage();">

Jason


On 5/10/2012 8:40 AM, nlajka - wrote:
> Hello,
>
> I am creating a simple report that how same listings and links in it and
> would like to add a button onto it so the user can click on it in order
> to refresh it.
>
> I am aware of the script that does automatic refreshing
> (http://www.eclipse.org/forums/index.php/mv/tree/163879/#page_top), but
> I don't know how to create a button that would work as a "refresher".
> Thanks!
Re: Button in a BIRT report [message #874768 is a reply to message #871081] Mon, 21 May 2012 14:04 Go to previous messageGo to next message
nlajka - is currently offline nlajka -
Messages: 61
Registered: April 2011
Member
I tried what you said but no luck.

There were some other things that I tried but they (http://www.mediacollege.com/internet/javascript/page/reload.html) didn't help either since they would prompt for parameters to be put in again when deployed (if I click on the button in a designer's preview mode then it refreshes fine)...

How to add parameter values to be incorporated into refresh process automatically so we ca avoid parameter prompting?

Thanks.

[Updated on: Mon, 21 May 2012 14:17]

Report message to a moderator

Re: Button in a BIRT report [message #874901 is a reply to message #874768] Mon, 21 May 2012 17:55 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

if you add the &parametername=parametervalue to the url it should work.
You can also add &__parameterpage=false to the url.

Jason

On 5/21/2012 10:04 AM, nlajka - wrote:
> I tried what you said but no luck.
>
> There were some other things that I tried but they
> (http://www.mediacollege.com/internet/javascript/page/reload.html)
> didn't help either since they would prompt for parameters to be put in
> again...
>
> How to add parameter values to be incorporated into refresh process
> automatically so we ca avoid parameter prompting?
>
> Thanks.
Previous Topic:Re: Setting Persistent Global Variable from DataSet
Next Topic:Birt styles priority
Goto Forum:
  


Current Time: Thu Sep 18 14:00:18 GMT 2014

Powered by FUDForum. Page generated in 0.15721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software