You must be logged in to reply to this topic.
Hi, how do I apply a filter at run time?
Click here to view the original newsgroup article (read only).
Since it appears that absolutely nobody from Component One reads or responds
to this Newsgroup, I'll go ahead and respond to your question…but I'm just
another customer trying to get help with this otherwise excellent product.
If I understand your question correctly, there are a couple of different
ways of applying "filters" at runtime.
You can set the RecordSource property to a SQL SELECT statement to
dynamically build the source for the report…you must do this in the OnOpen
event.
Or, if your recordsource includes a WHERE clause that expects a parameter,
such as in WHERE Customer = ?, then you can set the value of that prompt by
using the QueryParamVal collection like this:
vsreport1.QueryParamVal(1) = "whatever"
You can pass in as many prompts as you need, but I find it easier to build
my SQL within my code and simply set the RecordSource property…probably
some performance improvements that way as well.
wrote in message news:3a9b52fb@news.apexsc.com…
> Hi, how do I apply a filter at run time?
Click here to view the original newsgroup article (read only).
You must be logged in to reply to this topic.
As a leading component vendor in the Microsoft Visual Studio Industry Partner program, ComponentOne has been providing the widest range of Microsoft Visual Studio components, IDE platform development tools, and applications for over 22 years. ComponentOne product lines encompass custom WinForms, ASP.NET, WPF, Silverlight, Mobile, and COM components, documentation tools, and Web Parts for Microsoft Office SharePoint Server and Windows SharePoint Services.
Contact ComponentOne: 1.800.858.2739 | Pittsburgh: 412.681.4343
©2013 ComponentOne LLC All Rights Reserved.
All product and company names herein may be trademarks of their respective owners.
ComponentOne holds a license under Patent No. 5,490,216 (which expires on September 21, 2013)
