|
Re: Refresh a report [message #987507 is a reply to message #987471] |
Mon, 26 November 2012 22:28 |
|
Try something like the following:
<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&MyParameter="+<value-of>6</value-of>;
//alert( targetURL );
location.replace(targetURL);
return false;
}
timer=setTimeout('reloadPage()', 5000);
</script>
</form>
Note that the value of value should I suppose come from your row data.
Jason
|
|
|
|
|
|
Re: Refresh a report [message #987530 is a reply to message #987524] |
Tue, 27 November 2012 00:41 |
nlajka - Messages: 61 Registered: April 2011 |
Member |
|
|
I've created another report with just two parameters but than I added two data fields that would get parameter value. After that I would their values into url but it would prompt me for parameter values when the refresh occurs (in the birt-viewer). If I run it in the designer it would execute OK.
Why would it work fine in designer and not in the viewer?
Thank you for your help.
[Updated on: Tue, 27 November 2012 00:45] Report message to a moderator
|
|
|
Re: Refresh a report [message #988434 is a reply to message #987530] |
Thu, 29 November 2012 21:27 |
|
Is that a sample I can run? If you just want to hard code the values just add them directly in the string:
targetURL += "&__overwrite=true&MyParameter=6&MyParameter2=3";
Jason
|
|
|
Re: Refresh a report [message #988449 is a reply to message #988434] |
Thu, 29 November 2012 22:17 |
nlajka - Messages: 61 Registered: April 2011 |
Member |
|
|
Hello Jason,
thank you for replying. I pretty much gave up on autorefresh. I am getting so many errors that I don't know where to begin.
I changed now to the label that should contain a hyperlink which should be "clickable" by a user. So they should be able to click it when they want it.
Requirement is still the same. On click report should refresh with the same parameter values with no need for parameter values to be repeated in an parameter box. No hard-coded values at all. The latest exception I got is:
"
org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report.
"
I've checked value type in the parameter and procedure which is being called and at the both places type is int.
This is how the link looks like:
https://birt.DOMAINNAME.com/MyReport?__overwrite=true&Parameter1=<VALUE-OF>params["Parameter1"]</VALUE-OF>&Parameter2=<VALUE-OF>params["Parameter2"]</VALUE-OF>
What puzzles me is that when I check this link in javascript Expression Builderit tells me that there is an error and points towards ":" just after "https" as a wrong element in the link. When I remove "semicolon" out of the link it tells me that it is ok, but then it doesn't work as a hyperlink.
I would appreciate help a lot.
Once again,
Thank you.
[Updated on: Thu, 29 November 2012 22:21] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04185 seconds