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 -> Español

 Exportar a Excel resultado

Print topic Send  topic

Author Message
sfeijog

Posts: 2
Posted: 02/06/2009, 11:11 AM

Hola a todos les agradeceria mucho si alguien me ayuda , como puedo exportar a excel solo el resultado de una búsqueda

no se como capturar solo el resultado ya exporto a excel pero me exporta todos los datos de la tabla
View profile  Send private message
Oper


Posts: 1195
Posted: 02/10/2009, 8:27 PM

Primero como estas exportando a Excel?
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
sfeijog

Posts: 2
Posted: 02/14/2009, 8:41 PM

Hola

gracias por contestar estoy basandome en el ejemplo que hay en el code tengo un grid y en el evento de la página on initialize view pongo este código


global $ExportToExcel;
global $ToExcelLink;
global $Header;
global $Link1;

$ExportFileName = "Report.xls";
if (CCGetFromGet("export") == "1") {
//Hide the ToExcelLink Link
$ToExcelLink->Visible = false;
$Link1->Visible = false;
$Header->Visible = false;

//Set Content type to Excel
header("Content-Type: application/vnd.ms-excel");
//Fix IE 5.0-5.5 bug with Content-Disposition=attachment
if (strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 5.5;") ||
strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 5.0;")) {
header("Content-Disposition: filename=" . $ExportFileName);
} else {
header("Content-Disposition: attachment; filename=" . $ExportFileName);
}
}

En el evento de grid before select pongo este código


global $employees;

if (CCGetFromGet("export") == "1") {
//Show up to 10,000 records
$employees->PageSize = 10000;
$employees->ds->PageSize = 10000;
//Hide the Navigator
$employees->Navigator->Visible = false;
}
y en el link para exportar a excel creo un parametro de tipo expresión que sellama export

lo hago igual que en el ejemplo pero me exporta todos los datos de la tabla no entiendo como tengo que capturar los datos por que solo quiero exportar el resultado de una búsqueda,muchas graciasde antemano


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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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