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 -> General/Other

 Select top(x) rows

Print topic Send  topic

Author Message
TBMH

Posts: 40
Posted: 10/27/2008, 11:20 AM

I want to limit the users search results to 100 rows. In SQL Server this is just using "Select TOP 100 *". How can I do this in CCS?

Thanks,
Scott
View profile  Send private message
Gena

Posts: 591
Posted: 10/27/2008, 11:36 AM

Set "Records Per Page Property" for your Grid
_________________
Gena
View profile  Send private message
TBMH

Posts: 40
Posted: 10/27/2008, 1:47 PM

Thanks, Gena but that doesn't fix my problem. I probably should have been descriptive in my original post.

I have a search page that goes against a table that has about 200,000 rows. There are 5 different search criteria that a user can provide. The results grid is on the same page as the search dialog. A big problem in CCS is that when the page is accessed it loads the grid with results of a query with no search criteria (i.e. 200,000 rows). I have the page size set to 20 rows, however, the grids pager needs to determine the size of the data set so it will know how many pages to display. Therefore, it needs to select the enter table, get a record count, and then display 20 rows of data the user probably isn;t interested in.

If there is only one search criteria a workaround is to default the search criteria to an invalid value that doesn't return any rows. If you have multiple search criteria this doesn't work. The right answer would be make it so the search query doesn't run until the user hits the search button. I don't think this has been implemented, though.

View profile  Send private message
Gena

Posts: 591
Posted: 10/27/2008, 2:00 PM

OK! Check "Use LIMIT/TOP Property" in the connection property.
_________________
Gena
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.

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.