Trent L. Taylor (10/23/2008)
If you are calling scalar methods inside of the report, that can slow things down.Well I have a Custom Field Property "CustomerBuildingAddress" used like this:
GetData("ServiceCallProfileDS.CustomerBuildingAddress")+ " Apt " + GetData("ServiceCallProfileDS.Apt_No")
I did a simple test and use the Building Adress FK an ran the report and it took 11 Secs instead of 37 Secs. Here is the code for the Custom Field Property which I created in the main bo, not the report bo.
Public ReadOnly Property [CustomerBuildingAddress]() As System.String Get Dim loBusinessObject As New bizBuildings loBusinessObject.FillByPrimaryKey(
Me.FK_Buildings) If loBusinessObject.Count = 1 Then Return String.Format("{0}, {1} {2}", loBusinessObject.Street, loBusinessObject.City, loBusinessObject.State) Else Return String.Empty End If loBusinessObject.Dispose()
End GetEnd Property
How long is it taking to gather the result sets alone? This is generally the slow spot. Are you creating sprocs (genreally a good idea to improve performance)?
Yes, I am using a SP (thanks to Dustin for the clarification in another thread). The gathering of the data takes milliseconds, so it is pretty quick, I think my problem is with the Custom Field Properties, which are really nice, but guess I will need to use another solution to show those lookup fields descriptions.
Also, are you show a "generating report dialog" while RSS is generating the report? They have one by default that you can show, but we created our own and you can replace theirs. They have an implementation called IRenderSite that you can use to create a render status. When you call the ReportSLot.Prepare method, you can supply class that implements IRenderSite that will show dialog that you create (if that is what you want to do). This way you can at least see that the rendering is taking place.
Dim rs As New ReportSlot()
rs.Prepare(New MyCustomRenderSite())
I was not aware of such dialog, but yes I need to implement it, without it the user gets the impression that no report is being generated or that the system is freeze. I am using my own ReportViewerDialog and classes logic used in the StrataFlix, it took me some time to digest, but after that and with yours and Ivan help I was able to get it running with RSS, one thing that I also noticed is that after a report has been rendered and the preview form is closed, when a new report is generated, the image of the previous one will be shown until the new process completes the rendering, is there a way to overcome this?
Edhy Rijo