Wrox Programmer Forums
|
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2004, 03:45 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server Error

I am trying to learn to use Crystal Reports for Visual Studio .NET. After going through the walkthoughs successfully and practicing with SQL databases Northwind and pubs, I am attempting to create a report using a local database. Report Designer can read the table OK. My attempt fails as described below. I suspected a access permission problem, but permissions look OK? Can anyone suggest what is causing the problem?

Server Error in '/SteamersCustomerList' Application.
--------------------------------------------------------------------------------

Failed to open a rowset.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.InternalExc eption: Failed to open a rowset.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InternalException: Failed to open a rowset.]
   .F(String  , EngineExceptionErrorID 
) +642
   .A(Int16 , Int32 ) +537
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext) +539
   CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext) +189
   CrystalDecisions.Web.ReportAgent.u(Boolean N) +164
   CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1489




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Thanks,



 
Old March 16th, 2004, 04:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

im sure u havent login from rpt file, see the sample below, i hope this could help u.
DO NOT forget to change the values with yours!!!
Code:
    public class showreps : System.Web.UI.Page
    {

        //CR Variables
        Empower.reports.foreign        crReportft;
        Empower.reports.foreign_p    crReportfb;
        ConnectionInfo crConnectionInfo;
        TableLogOnInfo crTableLogOnInfo;
        Database crDatabase;
        Tables crTables;
        ParameterFields crParameterFields;
        ParameterField crParameterField;
        ParameterValues crParameterValues;
        ParameterDiscreteValue crParameterDiscreteValue;
        protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1;
        protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer2;

        private void Page_Load(object sender, System.EventArgs e)
        {
            string id, type;
                    id = Request.QueryString.Get("id");

                    crReportft = new Empower.reports.foreign();
                    crConnectionInfo = new ConnectionInfo();
                    crConnectionInfo.ServerName = "BORNA";
                    crConnectionInfo.DatabaseName = "NewBaz";
                    crConnectionInfo.UserID = "report";
                    crConnectionInfo.Password = "";

                    crDatabase = crReportft.Database;
                    crTables = crDatabase.Tables;

                    foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
                    {        
                        crTableLogOnInfo = crTable.LogOnInfo;
                        crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                        crTable.ApplyLogOnInfo(crTableLogOnInfo);
                    }

                    crReportfb = new Empower.reports.foreign_p();
                    crConnectionInfo = new ConnectionInfo();
                    crConnectionInfo.ServerName = "BORNA";
                    crConnectionInfo.DatabaseName = "NewBaz";
                    crConnectionInfo.UserID = "report";
                    crConnectionInfo.Password = "";

                    crDatabase = crReportfb.Database;
                    crTables = crDatabase.Tables;

                    foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
                    {        
                        crTableLogOnInfo = crTable.LogOnInfo;
                        crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                        crTable.ApplyLogOnInfo(crTableLogOnInfo);
                    }
                CrystalReportViewer1.ReportSource = crReportft;
                CrystalReportViewer2.ReportSource = crReportfb;
        }
    }
Always:),
Hovik Melkomian.
 
Old March 17th, 2004, 11:27 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Hovik,

Thanks for the suggestion. The problem was caused by incorrect permissions on the table.
I gave ASPNET SELECT permission and the report ran. Giving "public" permission also works.




 
Old March 27th, 2004, 04:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

happy to hear ur good news:) sometimes a dummy mistake stop projects for weeks;)

Always:),
Hovik Melkomian.
 
Old June 8th, 2007, 02:26 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have faced the permission problem, everything is fine if user was granted. however, how could i put this grant statement into CR, or perhaps put it in vb.net?






Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Reg. SQL Server does not exist error Arsi SQL Server 2000 1 June 11th, 2008 11:20 AM
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Error 500 -- Internal Server Error Vijay Kumar Servlets 2 March 26th, 2007 02:10 AM
server error when uploading to remote server ammweb ASP.NET 1.0 and 1.1 Basics 7 July 30th, 2006 01:51 AM
Error in Server when submitting this to the server zach2004 Classic ASP XML 0 March 8th, 2004 03:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.