Dlyne
Dlyne

Reputation: 13

How to sort by day in vb report?

I am a vb newbe. For the past few weeks, i have been developing a hotel reservation system using visual studio and ms access as database for a project. Everything else is smooth but for a few days, i am having difficulties in filtering my report done using report viewer. Report value is pulled from ms access query. The report is mainly about available guests information sorted by date. In my report, there is a checkin and checkout date for the guest. So mainly, the filter should also consider between the checkin n checkout as well. How can i filter my report so that it will show data in descending date order?

Upvotes: 1

Views: 546

Answers (1)

pg1988
pg1988

Reputation: 59

You can use Linq or create a view for the datatable and order the datatable and group.

Example of creating the datatable to a view and then sorting:

Dim dv As New DataView(oDT)
    dv.Sort ="ColumnName ASC"
    oDT = dv.ToTable

Use the ASC for ascending and DESC for descending The oDT is my datatable that I put into the view to sort

Upvotes: 1

Related Questions