Exporting OBIEE Dashboard page to Excel - export-to-excel

When exporting a dashboard page to excel, using the export to excel button, the page is displayed in multiple pages in excel.
How can the exported page display in a single page in excel?

Add a text control with HTML layout to your dashboard, and paste the below definitions into the control:
<script type="text/javascript">
function ExportXLS()
{
saw.dashboard.exportToExcel('/shared/Folder Path/','Report Name', true);
}
</script>
<a href=# OnClick='javascript:ExportXLS();'>Export To Excel</a>

Related

Display on Last Page of Export

I am attempting to follow the instructions on adding a header/footer to a kendo-ui grid here: https://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#template-headers-and-footers
However, I only want the header and footer to be displayed on the last page of the PDF export and I'm not exactly sure how to toggle the visible property when it is the last page.
I was able to resolve my issue by using the following in my kendo-template:
<script type="x/kendo-template" id="pdf-page-template">
<div class="page-template">
# if(pageNum === totalPages) {#
<!-- custom header/footer -->
#}#
</div>
</script>

Upload button appears when not called- but i have 2 instances

I have created 2 instances of S3 uploader in a page and i have given them different div names.
One of the instances is set to auto upload and the other is set to manual upload with edit file names set.
However the instance with auto upload is pulling the upload button from the other instance as well. It sits there and does nothing because the upload works as intended- automatically. Other than this rogue button both forms work as i want.
This is the div for the button but i only have it in one instance
<div id="triggerUpload-feeds" class="qq-upload-button start-upload" style="margin-top: 10px;cursor:pointer;">Upload</div>
Fine Uploader UI looks for a template in the document with an ID of "qq-template". Therefore, both uploaders are being constructed from the same template. If you want multiple uploaders on the same page that pull from different templates, you'll need to ensure you define multiple templates in your markup, each with a different ID. You'll then need to reference the appropriate template when you construct each Fine Uploader UI instance.
For example:
<script type="text/template" id="qq-template1">
<!-- template markup here -->
</script>
<script type="text/template" id="qq-template2">
<!-- template markup here -->
</script>
<script>
var uploader1 = new qq.FineUploader({
template: 'qq-template1'
});
var uploader2 = new qq.FineUploader({
template: 'qq-template2'
});
</script>
For more info, see the templating/styling feature page in the docs.

Jquery Image Preview on Hover with AJAX data

I have an image preview plugin. It works perfectly with images that are already in the page.
like:
<a href='ImgHandler.ashx?Id=5' class='preview' title='Landscape'>
<img height='18' width='18' class='ImgInCell' src='ImgHandler.ashx?Id=5' alt='Landscape' /></a>
But When i load the same type of code through Ajax on a DIV layer the image hover preview is not working.
<a id="LinkPic" class="preview" title="Land Scape" href="ImgHandler.ashx?Id=5">
<img id="ImgPic" style="height:50px;width:50px;" src="ImgHandler.ashx?Id=5" alt="Land Scape">
</a>
Then i used firebug and copied the source after the load of AJAX; created a html page; then on loading it, I see the image hover on the AJAX Image is working Fine.
The Jquery code for The image preview is called by following.
$(document).ready(function () {
imagePreview();
});
I think it is not working due to the document.ready . How do i make the image preview work on AJAX data(Image)??
Calling the imagePreview(); after the AJAX call didnt help.
i found no other way than to insert the jquery code into the AJAX called document (partial view) with change in class like imgpreview2, and now its working fine.

Load sharing widget via ajax into a lightbox and share the lightbox content

I've got a gallery of images, and I'd like users to be able to share those images to their social network.
When a thumbnail is clicked, an lightbox opens using colorbox, and ajax's in the images main view /images/view/<id> rendered as HTML, with an AddThis widget beneath it.
However I'm finding that because I'm loading the widget in using an ajax query there is obviously no event handler for it to catch and load it's bits. It's also, quite rightly, sharing the main url, seeing as it's been loaded in a lightbox.
Is there any way to overwrite this functionality or another sharing widget which will allow this kind of functionality? Or do I need to create my own sharing widget?
I have found a solution to this problem now, although it is more of a hack then anything else.
The basic principle is that you need to reinitialise the widget every time you load it back in.
The simple premise is that you include a ?domready=1 when loading the javascript.
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?domready=1#pubid=/*Your pubid*/"></script>
Then when you complete loading your ajax, you need to run,
window.addthis.ost = 0;
window.addthis.ready();
Which will reinitialise the widget. My code is thus. I cheated, and attached it to the global ajax handler, because of my php framework </aside>
$('.content').ajaxComplete(function(event, request, settings){
// We need to reinitialise the addthis box every time we ajax a lightbox in
// Apologies for using regex to read html when javascript can parse html!
// http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
if(request.responseText.match(/gallery-lightbox/i)){
window.addthis.ost = 0;
window.addthis.ready();
}
});
Once you've done this, the addThis widget will now load properly. Onto the second problem, of specifying the lightbox content as the sharing item.
This was much simpler, in that you can add the url into the button element. So you end up with widget markup like the following.
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1" addthis:url="http://example.com/<?php echo $image['Image']['id'];?>" addthis:title="My example title"></a>
<a class="addthis_button_preferred_2" addthis:url="http://example.com/<?php echo $image['Image']['id'];?>" addthis:title="My example title"></a>
<a class="addthis_button_preferred_3" addthis:url="http://example.com/<?php echo $image['Image']['id'];?>" addthis:title="My example title"></a>
<a class="addthis_button_preferred_4" addthis:url="http://example.com/<?php echo $image['Image']['id'];?>" addthis:title="My example title"></a>
<a class="addthis_button_compact" addthis:url="http://example.com/<?php echo $image['Image']['id'];?>" addthis:title="My example title"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?domready=1#pubid=/*Your pubid*/"></script>
<!-- AddThis Button END -->

How to use jQuery UI tabs to load external div via ajax

I'm using the Jquery UI tabs functionality to load content via ajax. I'd like to load a particular div in the ajax call, not the entire page. Is this possible without using jQuery's load()?
As you can see from the code, it's a stock standard basic jQuery tabs implementation, but I want a particular div rather than the full page.
Here's my html:
<div id="tabs">
<ul>
<li>Tab One</li>
<li>Tab Two</li>
<li>Ajax tab</li>
</ul>
<div id="tab-1>Tab one content</div>
<div id="tab-2>Tab two content</div>
</div>
And the inline script:
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
Anyone know if this is possible?
Nathan.
Yes, it is possible. Use jQuery ajax "load" function. Example:
$('#result').load('ajax/test.html #container');
For your 3rd tab you should manually load content via ajax call, also you can define selector which exactly part of loaded page you need. So, create 3rd tab as via general way, load page content for 3rd tab and create tabs. Or you can dynamically load 3rd tab's content when the user clicks on tab.
More information here: http://api.jquery.com/load/, please see paragraph "Loading Page Fragments".

Resources