azer Posted May 22, 2006 Share Posted May 22, 2006 select concat(products_name, ' - ', products_description, ' - - - ', products_viewed) as everything from products_description where language_id = 1 i understand this , but for sql , not pdf report , i still would like to know if i can have the different language for the same name product like if i wrote this : select concat(products_name, ' - ', products_description, ' - - - ', products_viewed) as everything from products_description where language_id = 1 AND NEXT LINE where language_id = 4 AND NEXT LINE where language_id = 1 the question is not on the fields i can add bu more on how to have the same info for each language in hte shop , see my previous exemple Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2006 Share Posted May 23, 2006 the thing is each row will return a set of separate columns. Those columns will repeat themselves. You may have to customize the script for that. Quote Link to comment Share on other sites More sharing options...
lazylex Posted May 27, 2006 Share Posted May 27, 2006 and see if you get this error printed. I still get the same error I see now that for some queries it works This one works select * from products p left join products_description pd on p.products_id=pd.products_id where pd.language_id = 5 This one not select p.products_image, pd.products_name from products p left join products_description pd on p.products_id=pd.products_id where pd.language_id = 5 Regards, Alex Quote Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2006 Share Posted May 27, 2006 I still get the same error I see now that for some queries it works This one works select * from products p left join products_description pd on p.products_id=pd.products_id where pd.language_id = 5 This one not select p.products_image, pd.products_name from products p left join products_description pd on p.products_id=pd.products_id where pd.language_id = 5 Regards, Alex I just tried it but I do not see the problem. In my case I have no language=5 so it creates a pdf report with the title. What happens when you execute other queries for instance: select customers_firstname from customers or select pd.products_name from products_description pd where pd.language_id = 5 Quote Link to comment Share on other sites More sharing options...
lazylex Posted May 28, 2006 Share Posted May 28, 2006 I just tried it but I do not see the problem. In my case I have no language=5 so it creates a pdf report with the title. What happens when you execute other queries for instance: select customers_firstname from customers or select pd.products_name from products_description pd where pd.language_id = 5 Both queries give the same error. I did some testing and when i use the first query I can see that the value of sizeof($colFits) = 1 and $this->numFields = 1 1 - 1 = 0 so we get the Devision by zero error. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2006 Share Posted May 28, 2006 Both queries give the same error. I did some testing and when i use the first query I can see that the value of sizeof($colFits) = 1 and $this->numFields = 1 1 - 1 = 0 so we get the Devision by zero error. yes you're right, thanks for the report, here is a workaround, I added some extra checking so you should be ok. Here it is: Replace both functions (mysql_report, query_report in pdf_mysql_report.php class file) this line of code $distribution = $surplus/(($this->numFields)-sizeof($colFits)); if( (($this->numFields)-sizeof($colFits)) <= 0 ) $distribution = 0; else $distribution = $surplus/(($this->numFields)-sizeof($colFits)); I will include this fix with the next release. Quote Link to comment Share on other sites More sharing options...
lazylex Posted May 30, 2006 Share Posted May 30, 2006 Thanks It works fine now.... Alex Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2006 Share Posted August 16, 2006 Mark, I'm about to add this excellent tool to my backend but wanted to check to see if you were going to release an update any time soon. Any news, tweaks etc? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2006 Share Posted August 16, 2006 Mark,I'm about to add this excellent tool to my backend but wanted to check to see if you were going to release an update any time soon. Any news, tweaks etc? There're few items I am working on but it maybe sometime before making the next release. Upgrades with new versions will be mostly backwards compatible unless you have your own customizations. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2006 Share Posted August 16, 2006 OK, are there any issues with the current release other than FF compatability? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2006 Share Posted August 16, 2006 OK, are there any issues with the current release other than FF compatability? Should be no ff compatibility issue with v1.01 as I remember it should include the extra browser check. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 26, 2006 Share Posted August 26, 2006 I've finally gotten around to installing this and have the same set of errors mentioned on page 1 of this thread. The fixes suggested have stopped the first error but I still get the : Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d112133822/htdocs/sub1/catalog/amin/includes/application_top.php:11) in /homepages/0/d112133822/htdocs/sub1/catalog/amin/pdf/fpdf/fpdf.php on line 1071 FPDF error: Some data has already been output to browser, can't send PDF file When I try even a simple little column and click the pdf button on the right. Also, is the top area supposed to load the script from the dropdown menu of my saved scripts? I don't think I have anything disabled in my browser that would stop it from functioning. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2006 Share Posted September 3, 2006 Ok so there is a bunch of warnings I see when I set full error report from the pdf class. I will have to make another release to fix these problems. For the time being just below the mysql_report and query_report functions in pdf_mysql_report.php add this $colFits = array(); $totAlreadyFitted = 0; It will initialize these 2 variables. There are others though, which I fixed and tested here but the version I use is quite different. It will take me some time to test it and do the release. The problem happens because if you get a warning from the php it will be sent to the output so the no pdf will be generated. And when you select an entry from the repository drop-down it should place the script in the text area. At least I tried it here with IE and FF and it works. Just make sure your jscript is functioning. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2007 Share Posted March 23, 2007 Mark, I still think this has the most tremendous potential of just about any Contrib. I run queries manually on a regular basis and this would make it much easier. Please continue to work on it as you get the time! Request: I could use a csv file export option. Trouble: I get an error of headers already sent like this: Warning: Cannot modify header information - headers already sent by (output started at /home/brushwoo/public_html/catalog/amin/includes/application_top.php:11) in /home/brushwoo/public_html/catalog/amin/pdf/fpdf/fpdf.php on line 1071 FPDF error: Some data has already been output to browser, can't send PDF file Then again, I just moved hosts and have a few issues on this. I get it also when I use the search function looking up a customer (in customers.php). I'll probably ask about it in general support but thought I'd mention it here in case it's code specific. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2007 Share Posted March 24, 2007 (edited) Dan, I think something else is going on. Because this module includes the fpdf library only within the pdf_mysql_report.php. So it cannot come from the application_top.php and especially with other scripts like the customers.php. Do you have another contribution/module in your admin that uses the fpdf library? And I have already the csv exporting working (for sometime now) but no time to release it properly. I am still looking at some issues with the pdf class and the way the cells are generated. I need to update/fix the class there and in the meantime I am trying to setup an xml export as well which I may push back. I cannot give you my word but I'll try to update it. Edited March 24, 2007 by enigma1 Quote Link to comment Share on other sites More sharing options...
timbeeren Posted September 18, 2009 Share Posted September 18, 2009 When I want to report the 'products' in pdf I get this error: Warning: Invalid argument supplied for foreach() in /virtualusers/xxxxx/xxxxx/xxxxxxxxxx/public_html/admin/includes/classes/pdf_mysql_report.php on line 255 Line 255 gives me: foreach($colFits as $key=>$val){ Other reports do work but the 'products' won't... Anybody know the solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.