CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 exporting grid search results to excel

Print topic Send  topic

Author Message
sldnkarm

Posts: 2
Posted: 03/22/2005, 8:20 AM

I am having no luck getting my grid results to export to excel.
I have added a link to the grid form to link to another page where I have:
header ("Content-type: application/vnd.ms-excel");
header("Content-Disposition: infile; filename=export.xls");

I tested the operation by addeing a grid to the "export" link page:
Added columns to the grid and tied the colums to fields in a table.
This works, but it is all data contained in the table. So how do I export just the already completed search results in the grid?

Chris
View profile  Send private message
Nicole

Posts: 586
Posted: 03/23/2005, 1:15 AM

Hello,
You can locate a result Grid form on a different page and save that page to Excel file. In this case only filtered recordset is saved in Excel format.

_________________
Regards,
Nicole
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 03/23/2005, 9:45 AM

Or....................you could also save the contents of the $object->ds->Where and $object->ds->Order (from the main Grid page) into session variables and on your download Grid page insert the Session variables before you execute the query (Insert session variables using the Event: Before Execute Select ). The code would look like this:
$object->ds->Where = CCGetSession("YourWhereSessionVariable"); 
$object->ds->Order=CCGetSession("YourOrderSessionVariable");
This will give you the same results as the previous page.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.