CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Help! Dynamic ORDER in a Report - Solved

Print topic Send  topic

Author Message
Koren

Posts: 83
Posted: 03/12/2011, 11:54 AM

Often I dynamically adjust the datasource of my grids using the following on "BeforeExecuteSelect" of the grid...

global $market_abbr;      	  
$Component->DataSource->SQL = str_replace("cg_",$market_abbr."_",$Component->DataSource->SQL);     
$Component->DataSource->Where = str_replace("cg_",$market_abbr."_",$Component->DataSource->Where);     
$Component->DataSource->Order = str_replace("cg_",$market_abbr."_",$Component->DataSource->Order);     
$Component->DataSource->CountSQL = str_replace("cg_",$market_abbr."_",$Component->DataSource->CountSQL);  

I created a simple report with the Report Builder.

When I use the above action on the Report, all the DataSource is adjusted correctly, with the exception of the "ORDER". Where can I dynamically adjust the order statement in a Report? Any insight would be GREAT!

Thanks!
Koren
View profile  Send private message
jjrjr2


Posts: 131
Posted: 03/12/2011, 1:07 PM

Hi

Try it like this.

Works for me in 4.3.0.7676

$Component->ds->Order = WHAT EVER U WANT..

BTW. Try $Comnent->ds->xxxxx for the other as well

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us
View profile  Send private message
Koren

Posts: 83
Posted: 03/23/2011, 3:28 PM

Thanks for the tip!!

In the interim I created an alias for the table that didnt require me to replace the string name when CCS created the Order.

But thank you John. I am sure that I will need it in the future. :)

Koren
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.

Web Database

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.