Table tools v2 copy/xls/csv/pdf dont work
Table tools v2 copy/xls/csv/pdf dont work
bocode
Posts: 9Questions: 0Answers: 0
Hi I just downloaded the table tools v 2 and followed all the documentation to plug it/customize it on my site. Unfortunately only the print button is working and the other 4 buttons are not working. I looked in firefox error console
and i see the following error:
Error: uncaught exception: Unable to load SWF file - please check the SWF path
and am getting this error as well:
b is null
Source File: http://localhost/shlk/js/jquery.dataTables.min.js
Line: 61
I looked at the datatables website and buttons there work properly when accessed from my browser (i can save pdf, csv, xls, and copy to clipboard).
Any ideas?
Bo
and i see the following error:
Error: uncaught exception: Unable to load SWF file - please check the SWF path
and am getting this error as well:
b is null
Source File: http://localhost/shlk/js/jquery.dataTables.min.js
Line: 61
I looked at the datatables website and buttons there work properly when accessed from my browser (i can save pdf, csv, xls, and copy to clipboard).
Any ideas?
Bo
This discussion has been closed.
Replies
[code] "oTableTools": {
"sSwfPath" : "media/swf/copy_cvs_xls.swf"
}[/code]
This is a given, and i did set this path before i started using TT. BTW the problem is coming from tabletools.js file from the zeroclipboard code. I copied ZeroClipboard.swf in all the places i can think of but still it does not seem to work.
Only print preview is working rest of the buttons dont.
am lost for any logical explanation :-(
Allan
I've set the path of copy_cvs_xls_pdf.swf properly and that does not seem to pose any problem. I'm referring to this piece of code in TableTools.min.js
var ZeroClipboard={version:"1.0.4-mod",clients:{},moviePath:"ZeroClipboard.swf",
The path i set in my tabletools initialization code is as follows:
"oTableTools": {
"sSwfPath": "/abc/swf/copy_cvs_xls_pdf.swf",
"aButtons": [ "copy", "csv", "print" ]
},
The path, as you can i see, is absolute and it is reachable.
Thank you
Bo
Allan
Thank you very much for offering to help. The website is on the intranet and is not accessible from outside.
However, i wanted this to work very badly so i searched for older version of table tools and i got it from this website: http://www6b.wittenberg.edu/lib/include/jquery/dataTables-1.6/extras/TableTools/
And it is working as expected except that there is no PDF export.
One thing i fail to understand is why does new TT version refer to ZeroclipBoard.swf when all it needs is either copy_xls_csv.swf (or the pdf version)?
Regards,
Bo
PDF export is something that was new in TableTools 2 - so you would need to use that if you want PDF export.
If you have Chrome around or Safari have a look at the inspector's console, it will tell you if there are any 404 errors. Likewise have a look at your server logs for 404 errors.
Allan
Firstly, I would like to express my gratitude for such great add-ons.
Now, I am having very similar issues, and in ways trying to fix this, have found:
1. the bundle of all extras with DataTables contains obsolete versions (in particular of TableTools)
2. all paths work fine, all checked with consoles, only I have a feeling there is an issue with the files contained into the 'as3' directory, is that a likelyhood? does this directory, as well as the 'docs' directory have an impact on the functionning of TableTools?
Many thanks & kind regards to all.
Nic
Any help or advice would be greatly appreciated... I spent my whole evening attempting to figure it out :S
PS: actually, I am having exactly the problem described in: TableTools: tableTools2 example doesn't work in firefox, but only in IE (forums)
Thanks Allan
But I have another issue
When i am using [b]Table tools[\b] , the bJQueryUI is not working .. the jquery ui theme is not applying to Data tables
My Table Configuration
====================
[code]
var oTable = $('#user_table').dataTable( {
"aoColumns": [
{ "sClass": "number", "bSortable": false },
{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false },{ "sClass": "nonedit", "bSortable": false }
],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "../js/DataTables/media/swf/copy_cvs_xls_pdf.swf",
"aButtons": [
"copy",
"csv",
"xls",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Your custom message would go here."
},
"print"
]
},
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": 'ajax_userreport_table?custom_field=a:14:{i:0;s:9:"user_name";i:1;s:15:"user_first_name";i:2;s:14:"user_last_name";i:3;s:13:"user_password";i:4;s:10:"user_email";i:5;s:11:"user_gender";i:6;s:10:"user_phone";i:7;s:8:"user_dob";i:8;s:12:"user_address";i:9;s:12:"user_country";i:10;s:10:"user_state";i:11;s:9:"user_city";i:12;s:12:"user_zipcode";i:13;s:13:"user_reg_date";}'
});
[\code]
[code]
"sDom": 'T<"clear">lfrtip',
[/code]
to
[code]
"sDom": 'T<"clear"><"H"lfr>t<"F"ip>',
[/code]
Allan
We have the same problem as yours! And I contacted Allan for help. The solution is that try to test and upload it on your web-server and it won't work from the file system (i.e. file://) as Allan said that there are some security settings in Flash, and that is why it is not working. Print button is working because it is not part of the Flash at all.
Btw, Thanks Allan for the help! :)
The problem was that I was hiding my datatable so all offset values were 0. So my all embed width and height were 0.
I hope it helps
navigated to DataTables-1.8.2\extras\TableTools
The Flash Buttons don't work and I have the Latest Version of Flash.
I click on the buttons and nothing happens.
Thanks
Allan
navigated to DataTables-1.8.2\extras\TableTools
The Flash Buttons don't work and I have the Latest Version of Flash.
I clicked on the buttons and nothing happens.
I tried this in Firefox and IE.
[code]
"oTableTools": {
"sSwfPath": "http://datatables.net/release-datatables/extras/TableTools/media/swf/copy_cvs_xls_pdf.swf"}
[/code]
It Still doesn't work.
It works fine here http://datatables.net/extras/tabletools/
Allan
I changed the path to see if it would work like it does on your site. I cannot get this work and all the code is the same.
Allan
I downloaded DataTables-1.8.2 from your Website. Extracted the zip file to my Local C Drive
Navigated to C:\DataTables-1.8.2\extras\TableTools2
Click on index.html and tried to click on Copy, CSV, Exce, and PDF nothing happens. When I click on The Print button highlights and It comes up in print preview.
A better solution is just to dump the files onto a web-server.
Allan
Thank you for the Explanation.
I had same issue - with flash buttons not working.
I had no 404, and if I used the path directly in the browser I got the flash swf fine.
so I was very ????
But as per @s8472 (I think) my problem was not about paths, nor about IIS / asp.net routing failing to serve the request properly (as I had issues with before on another system), but it was simply that I had hidden the buttons with css (and had some Jquery to show them when user wanted to export...)
I had following css
[code]
.DTTT_container {
display: none;
}
[/code]
Which was problem. Removing this and everything is hunkey dorey ! :)
Thanks all.
The code so far:
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@import "/media/css/demo_page.css";
@import "/media/css/demo_table.css";
@import "/css/jquery-ui/css/redmond/jquery-ui-1.8.4.custom.css";
@import "/TableTools/media/css/TableTools.css";
a { font-family: Arial, Verdana, sans-serif; font-size: 18px; color: #483D8B; text-decoration: none }
a:hover { font-family: Arial, Verdana, sans-serif; font-size: 18px; color: #A52A2A; background-color: #FAEBD7}
h1 { font-family: Arial, Verdana, sans-serif; font-size: 32px; color: #A52A2A }
h2 { font-family: Arial, Verdana, sans-serif; font-size: 24px; color: #A52A2A }
PERC Entity Location Report
$(document).ready(function() {
var oTable = $('#percloc3').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/TableTools/media/swf/copy_cvs_xls_pdf.swf",
}
});
new FixedHeader( oTable );
});
This displays the buttons, but if you move the mouse over them they vanish, leaving just the Print option. If I add an aButton for just xls, then no buttons appears.
[/code]
Microsoft JScript runtime error: Object required
and the code stopped at the function below:
function __flash__addCallback(instance, name) {
instance[name] = function () {
return eval(instance.CallFunction("" + __flash__argumentsToXML(arguments,0) + ""));
}
}
Can some expert help?
Edit: Everything worked fine when the table load the fist time but error out everytime after the first time.
@dshapiro:
1. Maybe your sSwfPath is wrong and it should be "TableTools/media/swf/copy_cvs_xls_pdf.swf",
did you try this:
var oTable = $('#percloc3').dataTable({ "sDom": 'T<"clear">lfrtip', "oTableTools": { "sSwfPath": "TableTools/media/swf/copy_cvs_xls_pdf.swf", } });
2. Are You missing ?