Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Record Reading Error Post Reply Post New Topic
Author Message
abhi81
Newbie
Newbie


Joined: 11 Jan 2007
Location: Canada
Online Status: Offline
Posts: 38
Quote abhi81 Replybullet Topic: Record Reading Error
    Posted: 17 Jan 2007 at 2:33pm
Hello,
I created the report using crystal report 11 and am firing it through an asp page using the smartviewer. The report is based on the record selection formula based on order_num in list.
 
When i try to open the report by providing the arguments to the asp page i get the following error.
 
'Error Occurred Reading Records: Logon failed. Details: [Database Vendor Code: 18452 ]-2147189176
 
 
My Code in the asp goes as:
ordno=request.QueryString("orders")
Session("oRpt").RecordSelectionFormula = "{ReportView1.order_num} in[" & ordno & "]"
 
Please advise....i think it is related to some data base access rights for the report but am not sure how to resolve it because it works fine on the designer.
 
I also want to refresh the report everytime before it is generated. How can this be done so that the previous generated values on the report are discarded.


Edited by abhi81 - 17 Jan 2007 at 2:34pm
IP IP Logged
abhi81
Newbie
Newbie


Joined: 11 Jan 2007
Location: Canada
Online Status: Offline
Posts: 38
Quote abhi81 Replybullet Posted: 18 Jan 2007 at 9:30am
Hello All,
The above problem was resolved. As i thought it was a database access error and i had to explicitly provide the connection info for each of the tables used in the report.
 
And this solved the error Smile.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jan 2007 at 12:54pm
Thanks for the update!  
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
qman
Newbie
Newbie
Avatar

Joined: 01 Aug 2008
Online Status: Offline
Posts: 5
Quote qman Replybullet Posted: 01 Aug 2008 at 4:31am
Hi, we are experiencing the same situation with reports run via ASP. All our reports were running fine yesterday and then bam, they stop working with the same error "Error Occurred Reading Records:".
 
Can you please tell me how/where you provided the connection info for each of the tables used in the report.
 
Thanks!
 
IP IP Logged
abhi81
Newbie
Newbie


Joined: 11 Jan 2007
Location: Canada
Online Status: Offline
Posts: 38
Quote abhi81 Replybullet Posted: 02 Aug 2008 at 8:29am
Hello,
Here is the code i used :

Dim loc As String = Server.MapPath("Invoice.rpt")
     
rptDoc.Load(loc)
rptDoc.Refresh()
      

rptDoc.SetDatabaseLogon("username", "password")

rptDoc.PrintOptions.PrinterName = pname


rptDoc.PrintToPrinter(1, False, 0, 0)

where rptDoc is the ReportDocument object.

Basically u just need to provide the database credentials for each report before opening it.
Let me know if it helps u.

IP IP Logged
qman
Newbie
Newbie
Avatar

Joined: 01 Aug 2008
Online Status: Offline
Posts: 5
Quote qman Replybullet Posted: 04 Aug 2008 at 3:56am
Thanks abhi81,
 
We ended up reinstalling the Cyrstal Engine on the server.
This worked for all but one ASP which calls 4 different reports......
I will have a look at the ASP and hopefully get it to work using your suggestion.
 
Thanks again!
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.