Is there data returned when the number of pages is 0?
If there is data and the number of pages is incorrect, there may be a problem with the toolbar configuration. If you want to configure the ReportViewer toolbar, you can do so by setting properties in the Properties window or in code. For the Microsoft.Reporting.WebForms.ReportViewer property, you can refer to this link: https://learn.microsoft.com/en-us/dotnet/api/microsoft.reporting.webforms.reportviewer?redirectedfrom=MSDN&view=sqlserver-2016#properties.
Among them, you can try to configure properties such as CurrentPage, PageCountMode, etc.
CurrentPage can get or set the current page of the active report of the ReportViewer control.
PageCountMode can get or set a PageCountMode enumeration value that indicates the default page count mode to use when rendering the report in the report area.
If the answer is helpful, please click Accept Answer
and Up-Vote
for the same. If you have any questions, please feel free to let me know.
Best regards,
Aniya