newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
Go Back  Xtreme Visual Basic Talk > > > newbie in crystal report(using ASP.NET with VB.NET)


Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2004, 09:15 PM
Joseph_R_Thomas's Avatar
Joseph_R_Thomas Joseph_R_Thomas is offline
Regular
 
Join Date: Nov 2003
Location: At the feet of Jesus
Posts: 64
Unhappy newbie in crystal report(using ASP.NET with VB.NET)


hi..i managed to do the crystal report thing.. but i haveone problem.... i get this error whlie i try to run the app. :


Server Error in '/Report' 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.LogOnException: 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.FormatEngine.GetPage(PageReques tContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageReques tContext pageReqContext)
CrystalDecisions.Web.ReportAgent.u(Boolean N)
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Page.ProcessRequestMain()


can some one pls tell me how can i avoid this error?? and how can i get it to work???
tks a lot
__________________
"Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
Reply With Quote
  #2  
Old 10-25-2014, 11:06 PM
hrothenb hrothenb is offline
Newcomer
 
Join Date: Oct 2004
Posts: 2
Default

Try:

Imports CrystalDecisions
Imports CrystalDecisions.CrystalReports
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.IO

Public Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub LinkButton1_Click(sender As Object, e As EventArgs) Handles LinkButton1.Click

OpenPDF(Request.ApplicationPath + "/Reports/Report.pdf")

End Sub


Private Sub OpenPDF(downloadAsFilename As String)
Dim RptDoc As New ReportDocument()
RptDoc.Load(Server.MapPath(Request.ApplicationPath + "/Reports/myreport.rpt"))
RptDoc.SetDatabaseLogon("user", "password", "server", "database")

Dim stream As New BinaryReader(RptDoc.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat))
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", Convert.ToString("attachment; filename=") & downloadAsFilename)
Response.AddHeader("content-length", stream.BaseStream.Length.ToString())
Response.BinaryWrite(stream.ReadBytes(Convert.ToInt32(stream.BaseStrea m.Length)))
Response.Flush()
Response.Close()
End Sub
End Class
Reply With Quote
  #3  
Old 11-19-2014, 09:11 AM
hrothenb hrothenb is offline
Newcomer
 
Join Date: Oct 2004
Posts: 2
Default

Imports CrystalDecisions
Imports CrystalDecisions.CrystalReports
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim RptDoc As New ReportDocument()
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim crtableLogoninfo As New TableLogOnInfo

RptDoc.Load(Server.MapPath(Request.ApplicationPath + "/Reports/myReport.rpt"))

With crConnectionInfo
.ServerName = "myServer"
.DatabaseName = "myDatabase"
.UserID = "myUserID"
.Password = "myPassword"
End With

CrTables = RptDoc.Database.Tables

For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next

RptDoc.SetDatabaseLogon(crConnectionInfo.UserID, crConnectionInfo.Password, crConnectionInfo.ServerName, crConnectionInfo.ServerName)

RptDoc.SetParameterValue("@myParameter", myValue)

Dim stream As New BinaryReader(RptDoc.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat))

Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", Convert.ToString("attachment; filename=") & myDownloadAsFilename)
Response.AddHeader("content-length", stream.BaseStream.Length.ToString())
Response.BinaryWrite(stream.ReadBytes(Convert.ToInt32(stream.BaseStrea m.Length)))
Response.Flush()
Response.Close()
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie vb.net Ques: How do you find difference in time? andru General 1 11-01-2003 03:36 AM
VB.Net and ASP.Net video training robls General 1 08-26-2003 11:35 AM
Newbie Crystal Report question rockuman_ex Database and Reporting 1 05-23-2003 05:58 AM
VB.Net with Crystal Reports 8 j4yang Database and Reporting 1 11-25-2002 02:28 PM
Crystal Reports (newbie) Dale S Database and Reporting 4 07-29-2002 02:05 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET) newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
 
newbie in crystal report(using ASP.NET with VB.NET)
newbie in crystal report(using ASP.NET with VB.NET)
 
-->