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

 Custom SQL in Report

Print topic Send  topic

Author Message
idh63

Posts: 76
Posted: 03/04/2008, 5:48 AM

Hi there,

I am building a page that has two report grids.

One is a monthly transaction summary report, the other a transaction details report.

I have a link on the month names shown in the summary that alters the details transaction report to only display the transactions for the given month.

I realized that I would have to use custom SQL and WHERE to achieve what I needed.

Here's where I fell in a pothole.

If I create my SQL and WHERE in Before Build Select, the sql in the DATASOURCE Properties replaces the sql and where.

If I remove the sql statement from the datasource properties, I get an error attempting to run the page: Fatal error: Call to a member function Count() on a non-object.

So, If i leave the sql in the Properties panel and use Before Execute Select for my custom SQL and WHERE, I get my customized results because it is replacing the sql after the sql from the properties panel is created.

I am wondering if I have to go further with my custom code to fix the Fatal Error if I remove the SQL in the parameters. For example, I dont have groups but I do have sections. I have Lines Per Page, and Page Size Limit set.

I am hoping that someone has been down this road before me and can suggest the best practice here. My custom SQL and WHERE works using After Build Select and leaving a sql statement in the properties datasource.

Thanks
View profile  Send private message
datadoit
Posted: 03/04/2008, 8:26 AM

If I understand you correctly, if you modify the SQL in your
BeforeBuildSelect event, then you'll also need to modify the SQL in your
BeforeUpdate/Insert events. Or, look at the Custom Insert/Update
features built-in (the [...] button in the properties panel).

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.