caveman_dick wrote:
Hi
I have been trying to build a page that shows all records by default but can filter by a status field.
I am unsure where to place the code for filtering and the exact syntax to use. Can the filtering code be placed in the performselect event?
As the value on which you want to filter is a value in a dropdownbox, you can do this at design time by specifying a SelectParameter for the OrdersDS.
Open your page in design view in vs.net, select OrdersDS and go to the property grid of vs.net, there you'll see SelectParameters. select it in the properties grid and you'll see a button [...]. Click it and a designer opens. There you can add a new select parameter which should retrieve its value from the dropdownbox DropDownList1.
It results in this HTML which will be placed inside the LLBLGenProDataSource2 tags:
<SelectParameters>
<asp:ControlParameter ControlID="_countrySelector" Name="Country" PropertyName="SelectedValue" />
</SelectParameters>
(example)
This is a big step forward from ASP.NET 1.x, but you have to learn from scratch how it works, so take your time
It might be good to read a tutorial or two about parameter binding in ASP.NET 2.0, as it's very powerful.
You can also rework your code if you like that more, your code crashes because you assume Filter has a value, but as you didn't set a filter, it crashes as it's null. So first add your filter to a RelationPredicateBucket, then simply use that relationpredicatebucket in teh FetchEntityCollection.
Also is the llblgen code compatible with the microsoft reporting bundled with dotnet 2? If not is there any plan to support it, or do you have any recommendations?
I'm not familiar with microsoft reporting, but if ms reporting is software written to be used by everyone, I don't see why llblgen pro code wouldn't work with ms reporting.