Link to home
Start Free TrialLog in
Avatar of netsmithcentral
netsmithcentralFlag for United States of America

asked on

Crystal Reports SQL Timeout Issue

I'm not sure whether to ask this as an independent question or a pointer.  It's related to the question at https://www.experts-exchange.com/questions/22088714/net-application-gets-a-SQL-timeout-error-on-certain-aspx-pages-trying-to-query-data.html?qid=22088714 , but it's not really the same question.  An ASP.NET appliction I'm trying to repair (it was not built by me nor do I have any decent documentation/source code for it) is returning a Timeout error right now.

The page is ReportViewer.aspx (which looks like it might be a standard CrystalDecisions/CrystalReports page) and it displays any report requested.  Certain reports are returning timeout (regardless of the data you try to populate them with).  I used Crystal Reports to pull the SQL query the report is running and ran it against my database in SQL Query Analyzer.  Not only does it work perfectly, it only takes approximately 12 seconds to complete (default timeout is 30 seconds).

I don't entirely understand how CrystalReports gets its data or returns it so I'm not really sure where to go from here.  If there's anything I can post to help you help me, please ask!
Avatar of Mike McCracken
Mike McCracken

What is the SQL?

Are there any complex filters?  Check REPORT --> SELECT EXPERT

mlmcc
Avatar of netsmithcentral

ASKER

Here's the SQL Query (Database | Show SQL Query)

 SELECT "parcel"."apn", "parcel"."grantor", "parcel"."propaddr", "parcel"."propdesc", "parcel"."grantee", "parcel"."addr", "parcel"."city", "parcel"."zip", "parcel"."flender", "parcel"."slender", "parcel"."price", "parcel"."status", "parcel"."ownerocc", "parcel"."legal1", "parcel"."legal2", "parcel"."first", "parcel"."second", "parcel"."zoned", "parcel"."docnum", "parcel"."history", "parcel"."tdate", "parcel"."parcel_book", "parcel"."parcel_page", "parcel"."lname", "parcel"."parcel_number", "parcel"."pricecode", "parcel"."parcel_id", "parcel"."tdate_dt", "parcel"."city_name"
 FROM   "SLOCO_Property"."dbo"."vw_cr_apn_browser_city_name" "parcel"
 WHERE  "parcel"."grantee" LIKE '%' AND "parcel"."propaddr" LIKE '%' AND ("parcel"."propdesc" LIKE '%' OR "parcel"."legal1" LIKE '%' OR "parcel"."legal2" LIKE '%') AND "parcel"."parcel_book" LIKE '%' AND "parcel"."parcel_page" LIKE '%' AND "parcel"."zoned" LIKE '%' AND "parcel"."ownerocc" LIKE '%' AND "parcel"."status" LIKE '%' AND "parcel"."lname" LIKE '%' AND "parcel"."parcel_number" LIKE '%'


As for complex filters, it seems like there are some.  Here's a screenshot of one of the tabs: http://www.netsmithcentral.com/Files/crystal_reports.bmp (sorry for the BMP format... no photoshop on this computer).
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would be more than happy to extend the timeout, but I don't know where to do it.  Like I said, this isn't my code, and personally I've never dealt with Crystal Decisions dll's before.  Is there some property I can set on the CrystalDecisions object in my ReportViewer.aspx page?

By the way, if I didn't make it clear, this web app worked flawlessly for about two years before it failed without any clue as to why.
Take a look at the properties of the web site in IIS on the web server.  Check the connection timeout there and increase the time if it's set to 30 seconds.

Also, have you verified that you can hit the SQL Server from the web server?  Just in case something changed on either end and the timeout is being caused because the db can't be reached.

frodoman
IIS's default timeout is 120 seconds.  I kicked it up to 1000 seconds with no difference.  This is a one server environment, SQL and Web are on the same box with a seperate computer used for development only.
What exactly was the solution?  Where is this timeout adjusted?