I have created a report which need to fetch 2 lakh records (transactions) for 9922 Assets and have filter by Start and End date , Asset group and Asset number.
I have "Openning Balance , On period Purchase , On period Sales and Closing Balance " based on the transaction type.
I have created a query from "FixedAssetListing " view to get all filter and calculation all in “ProcessReport” method in Dp Class by using one while (While (qr.Next())) and some If else only .
When I am running this report for heavy data it’s taking lot off time and some time getting Out of time error also .
How can I do that ?
Does it mean that you already know that the query itself is slow, so we can completely ignore the RDP class, the report etc.? It will greatly simplify your testing. You can starting running the query from a job or so.
I would start by reviewing the actual SQL query generated from your query definition; some bug are easy to spot in that way. If it doesn’t help, run the query in SQL Server Management Studio (after enabling the capture of statistics and the actual execution plan). The advisor may suggests some extra indexes and statistics and the execution plan will tell you which part of your query is slow and why. Don’t forget that you’re not the first one trying to optimize a query, therefore you’ll find a huge amount of information on internet.
If you don’t know whether the slow part is the query or something else, tracing + Trace Parser is a good starting point.
Yes query taking time to collect data but it’s getting data and sending to print … Report is getting stuck once it’s start printing pages.
We are getting Loading screen but after that getting time out error from “SrsReportViewer” form…