Solved

Error Occurred Reading Records error message

Posted on 2004-09-02
8
917 Views
Last Modified: 2012-06-21
i have a report with a stored procedure with one parameter called @teamid


i can preview the report in crystal developer 10 and it shows up perfect.   although when i want tp preview it in my asp page using vbscript    i get this error

Error Occurred Reading Records: Logon failed. Details: ADO Error Code: 0x80004005 Source: Microsoft OLE DB Provider for SQL Server Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. SQL State: 08001 Native Error: 17


do i have to set up a connection and call the parameter in my asp page??

please help
0
Comment
Question by:gianitoo
  • 4
  • 3
8 Comments
 
LVL 42

Expert Comment

by:frodoman
Comment Utility
This means that you haven't provided authentication for your SQL Server db -or- that the db can't be reached from the server hosting the asp page given the connection you've indicated.  Given that you aren't being prompted for login credentials I would guess that it's a connection problem.

If you show your code then someone can probably pinpoint the error.

frodoman

0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Agree with frodoman.  Is the SQL Server accessed the same way from the network or are you developing on a separate LAN?

mlmcc
0
 
LVL 1

Author Comment

by:gianitoo
Comment Utility
i have developed the report in developer in a different LAN.    so the connection open fine when i open with developer in both ends   mycomputer and the web server.     i call the report from this page.    do i have to add the connection again here to the datbase, even if the connection was already set up in the report?  

this is my latest error  
  Error Occurred Reading Records: Logon failed. Details: ADO Error Code: 0x80040e4d Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'giani'. SQL State: 42000 Native Error: 18456


<%@ LANGUAGE="VBSCRIPT" %>

<%
'=======================================================================
' WORKING WITH THE REPORT DESIGNER COMPONENT AND ASP TO PREVIEW A REPORT
'=======================================================================
'
' CONCEPT                                                            
'                                                                    
'  ALWAYS REQUIRED STEPS (contained in AlwaysRequiredSteps.asp)
'   - create the application object                                
'   - create the report object                                    
'   - open the report                                              
'
'  MORE ALWAYS REQUIRED STEPS (contained in MoreRequiredSteps.asp)
'   - retreive the records                                        
'   - create the page engine
'
'  DISPLAY THE REPORT
'   - display the report using a smart viewer
'==================================================================
%>

<%
' This line creates a string variable called reportname that we will use to pass
' the Crystal Report filename (.rpt file) to the OpenReport method contained in
' the AlwaysRequiredSteps.asp.

reportname = "roster.rpt"
%>

<%
'==================================================================
' ALWAYS REQUIRED STEPS
'
' Include the file AlwaysRequiredSteps.asp which contains the code    
' for steps:
'   - create the application object
'   - create the report object
'   - open the report
'==================================================================
%>                                                                    
<!-- #include file="AlwaysRequiredSteps.asp" -->                      

<%
'==================================================================
'
'  MORE ALWAYS REQUIRED STEPS
'
'  Include the file MoreRequiredSteps.asp which contains the code
'  for the steps:
'   - retreive the records                                        
'   - create the page engine                                      
'
'==================================================================
%>
<!-- #include file="MoreRequiredSteps.asp" -->

<%
' INSTANTIATE THE REPORT VIEWER
'
'When using the Crystal Reports in an ASP environment, we use
'the same page-on-demand Report Viewers used with the Crystal Web Component Server.
'There are six Report Viewers:
'
'1.  Report Viewer for ActiveX
'2.  Report Viewer for Java using Browser JVM
'3.  Report Viewer for Java Using Java Plugin
'
'The Report Viewer that you use will based on the browser's display capablities.
'For Example, you would not want to instantiate one of the Java viewers if the browser
'did not support Java applets.  For purposes on this demo, we have chosen to
'define a viewer.  You can through code determine the support capabilities of
'the requesting browser.  However that functionality is inherent in the Crystal
'Reports RDC and is beyond the scope of this demonstration application.
'
'We have chosen to leverage the server side include functionality of ASP
'for simplicity sake.  So you can use the SmartViewer*.asp files to instantiate
'the smart viewer that you wish to send to the browser.  Simply replace the line
'below with the Smart Viewer asp file you wish to use.
'
'The choices are SmartViewerActiveX.asp, SmartViewerJava.asp and JavaPluginViewer.asp.
'Note that to use this include you must have the appropriate .asp file in the
'same virtual directory as the main ASP page.
'

'=============================================================================
'  DISPLAY THE REPORT
'   - display the report using a smart viewer
'
' Include one of the Smart Viewers.
'  - Report Viewer for ActiveX                          =   SmartViewerActiveX.asp
'  - Report Viewer for Java Using Java Plugin      =   JavaPluginViewer.asp
'=============================================================================
%>
<!-- #include file="SmartViewerActiveX.asp" -->        
0
 
LVL 1

Author Comment

by:gianitoo
Comment Utility
i guess i have to pass this info  below from my asp page to the report.    how do i do that?


Server: DBServer
UserID: Administrator
Password: Password
Database: DB Name
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:gianitoo
Comment Utility
i fixed it by allowing the stored procedure to be viewed over the web from enterprise manager
0
 
LVL 42

Expert Comment

by:frodoman
Comment Utility
Sorry I haven't had a chance to look at this - glad you've gotten it working though.

Cheers,

frodoman
0
 
LVL 1

Author Comment

by:gianitoo
Comment Utility
can u help me passing a parameter from asp if i post a new question?   it is a simple parameter called @teamid
0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
Comment Utility
Sure, but you can probably just copy & paste some code from one of the sample applications: http://support.businessobjects.com/communityCS/FilesAndUpdates/aspxmps10.exe.asp

Or save your points and just search this forum for some more examples.  Your call of course.

frodoman
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now