Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Forcing a new viewer window
bgbaird
Hello World,
I am using an HTML form within a BIRT text object to invoke another report design and pass entered data as a parameter in the url.
What I've found/stolen on the intraweb gets me to where it will open in the parent window, but I need to force it into a new window (I am calling the detail report from subscribed BIRT Mobile content, and I don't wish to force the user landing page instance to close.)
I've tried window.open, _blank, new, .......Help please
Here is my HTML:
<form action="JavaScript:runReport()" method="post" id="form">
<fieldset>
<input type="hidden" name="subject" value="test&">
PO Number:<input type="text" id="poNum" name="poNum">
<input type="submit" value="Submit">
</fieldset>
</form>
<script type="text/javascript">
var f = document.getElementById("form");
f.onsubmit = function runReport()
{
var po = document.getElementById("poNum")
window.location="executereport.do?__executableName=/CustomerContent/ReportContent/orderDetail.rptdesign&invokeSubmit=true&custPO="+po.value;
}
Find more posts tagged with
Comments
mwilliams
So, this is on mobile? Which mobile browser are you testing on?
bgbaird
iPad v3.2 HD. I get the same behavior in 11 sp3 IV on ie, chrome, and ff
bgbaird
Michael, I am attaching examples that run out the "Public" folder on the volume.
I intend for several of these to exist on an rptdesign that builds the landing page for our customers. They would allow the user to enter params for various reports and invoke without going to the param page.
I am also attaching an html that displays another selector.
mwilliams
<blockquote class='ipsBlockquote' data-author="'bgbaird'" data-cid="107778" data-time="1343868506" data-date="01 August 2012 - 05:48 PM"><p>
iPad v3.2 HD. I get the same behavior in 11 sp3 IV on ie, chrome, and ff<br /></p></blockquote>
<br />
So, this also happens to you if you're running from IV on a PC? Let me know.
bgbaird
I do see the same behavior in any viewer. It won't resolve in the IDE, but that is expected behavior.
I'm trying to invoke the actuate.Viewer class in Initialize on the target report, but am not getting anywhere.
actuate.load("viewer");
var myViewer = new actuate.Viewer("targRpt");
mwilliams
If I use window.open in your testSource report, I get a new window to open up. From IV on Chrome on PC.
window.open("executereport.do?__executableName=/Public/testTarget.rptdesign&invokeSubmit=true¶mVal="+paramVal.value);
As far as opening on mobile, unfortunately I don't have a setup for this, right now. I have seen that there are issues opening new windows on iPads and iPhones, by doing some searches on the issue.
If I find some time, I'll try to get my mobile viewer set up to do some testing, but I've only got Android options to test on. No ios.
bgbaird
Thanks Michael, I'll give it a shot. Let's tell Krishna he needs to take better care of you.
bgbaird
Now it's opening 2 new windows. Progress I think....
mwilliams
Two, huh? Do you have some other script in your second page that is attempting (and succeeding) to open a window too? Like you said you were trying to do?
bgbaird
FYI: Here's how it finally came together..AND it works on iOs!
<script type="text/javascript">
function runReport()
{
var paramVal = document.getElementById("valParam")
window.open("executereport.do?__executableName=/Custom.....invokeSubmit=true¶mName="+paramVal.value);
}
</script>
<form action="reportCall" method="post" id="paramForm" target="NewWindow">
<input type="text" id="valParam" name="valParam">
//DEFINE SPECIFIC BUTTON ACTION!
<input type=button onClick="javascript:runReport();" value="Submit Request">
</form>
mwilliams
Awesome! Glad you got it going! Thanks for the update!