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