 |
| ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.1 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
|
|
|
|

September 8th, 2003, 10:03 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
crystall report error
helo
when i try to run simple crystall report from asp.net its giving below error pl help me
Server Error in '/sample' Application.
--------------------------------------------------------------------------------
Logon failed.
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.LogOnExcept ion: Logon failed.
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:
[LogOnException: Logon failed.]
.F(String , EngineExceptionErrorID
)
.A(Int16 , Int32 )
.@(Int16 )
CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.u(Boolean N)
CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
here i am attaching my code alos
pl help me srin
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class sis1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Dim oRpt As New ReportDocument
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strReportFileName As String
strReportFileName = "sis.rpt"
oRpt.Load("C:\Inetpub\wwwroot\sample\sis.rpt")
LogOn()
CrystalReportViewer1.ReportSource = oRpt
CrystalReportViewer1.DataBind()
End Sub
Private Sub LogOn()
Dim crConnInfo As New ConnectionInfo
Dim tInfo As New TableLogOnInfo
Dim crLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
crLogonInfo = oRpt.Database.Tables(0).LogOnInfo
crLogonInfo.ConnectionInfo.ServerName = "HFT-MURTHY"
crLogonInfo.ConnectionInfo.UserID = "sa"
crLogonInfo.ConnectionInfo.Password = "sa"
crLogonInfo.ConnectionInfo.DatabaseName = "AP_SMART"
oRpt.Database.Tables(0).ApplyLogOnInfo(crLogonInfo )
End Sub
End Class
|
|

September 8th, 2003, 10:57 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
it seams u just made a connection with ur DB & not for tables! maybe these codes will help u to do that, I think u need to connect ur tables to DB too.
HTH.
Code:
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)
{
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;
}
Always:),
Hovik Melkomian.
|
|

September 16th, 2003, 04:16 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi thanks for response.
here i am providing login info for tables also
oRpt.Database.Tables(0).ApplyLogOnInfo(crLogonInfo )
still its giving same error.need to do any settings in project side or some where else.pl help me
thanks sri
|
|

September 16th, 2003, 04:35 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
Well, ehhhhhhhh do u use the same user, in Report design & run time?!
can u use this report in Cristal Report or not?!
u have login problem. it should be for either Server or Tables.
keep me inform.
Always:),
Hovik Melkomian.
|
|

September 16th, 2003, 10:37 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes i used same user for both design and runtime.
I dont have crystall report software.so i didn't try it.I am running using visual studio.net(asp.net).if i remove the table fields(database fields) from my report layout i can run the report on the web.what could be the problem?Any settings in project side??
same time one more ques is there any prob while deployeeing if i use
crystallreport.net version.i mean any licensing problems?Actually ours is small organization may be 25 users may access the site.
advice me thanks
|
|

September 21st, 2003, 04:10 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
Ive got an idea! lets try it?!
Check Save data with report from File menu.
this will save the user info & ... but wont save Password! then create a user without Password & then use that user for that report!
Sorry to be late, Keep me inform.
Always:),
Hovik Melkomian.
|
|

November 22nd, 2003, 01:15 AM
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
Where you successful in your attempt. I tried and I got the same error. How did you solve it. PS : Save data with report works but mine is a parameter query and based on parameters it should change and it fails at that time.
Please help me if you have solved or what was the work around you did.
Thanks
MK
|
|
 |