Search code examples
visual-studiosortingreportrdlcorganization

Organizing data in report (rdlc)


I have sql query which shows me data in RDLC report. Query is not important for this purpose, so let's just say that I have table with name, city, country, company, phone number. I want to display list of all data, sort by country, but first only show country that begins with "A" then I want page break and on new page to "print" country with B and so on. There must be a proper way to do this but I don't know it.


Solution

  • To page break your report based on the first letter of the field only, first add group by your Country field, then click on Expression button (fx button) in group property:

    enter image description here

    and edit your grouping expression to be

    =Left(Fields!Country.Value, 1)

    And then set your page break in "Page Break" tab:

    enter image description here