lastcanary (03/25/2010)
Should we write the complete SQL sentence to retreive only the required rows?
Yes, report data should be limited by any parameter. You can do a simple test with a plain .Net project not SF and see if you will get the same out of memory error with a data table and your "SELECT *" statement. Of course the BO & BSS classes should add some overhead on the memory since they do more stuff than the plain data table, but I believe the most rececent SF release address several memory leaks in this regard.
How do you solve this problem when you write your queries for reports?
Using a parameter form dialog to capture End User parameter and pass that to the report engine. I have been using the SF BrowseDialog in the same fashion as the StrataFlix project but I have also asked SF team to create a dialog for reporting purpose generic enough like the BrowseDialog.
We are planning to support many databases and if we write the complete SQL query we should write it depending on the database.
I agree it could be tricky, but I think that if SF produce a BrowseDialog for reporting purpose this issue may be covered. You can see the discussion here