Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: report from stream reader? Post Reply Post New Topic
Author Message
crafty
Newbie
Newbie
Avatar

Joined: 20 Jul 2008
Location: South Africa
Online Status: Offline
Posts: 1
Quote crafty Replybullet Topic: report from stream reader?
     Posted: 20 Jul 2008 at 10:25pm
Is it possible to store the crystal rpt file inside either a resource file or database, and call it that way?

this is more or less what i have at the moment:
Public Function EventOverview(ByVal EventID As Integer)


        'Dim sExt As String
        'Dim rType As CrystalDecisions.Shared.ExportFormatType
        'Dim sContentType As String

        Dim oCI As New CrystalDecisions.Shared.ConnectionInfo
        Dim oRD As New CrystalDecisions.CrystalReports.Engine.ReportDocument
        Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim crTableLogOnInfo As CrystalDecisions.Shared.TableLogOnInfo

        With oCI
            .DatabaseName = DbLogonDetails.dbDatabaseName
            .ServerName = DbLogonDetails.dbServer
            .UserID = DbLogonDetails.dbUsername
            .Password = DbLogonDetails.dbPassword
        End With

        oRD.Load(rbaRegistry.ReportPath & "\EventOverview.rpt")

        oRD.SetParameterValue("@EventID", CInt(EventID))

now i would like to chage the line in bold to read from either the database or a resource file?



Kind Regards





Edited by crafty - 20 Jul 2008 at 10:25pm
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Jul 2008 at 1:44pm
I don't think this is possible - the .Load method only works from files.  There may be a way to cast the contents of the stream reader to something that it can read, but I'm not sure how to do that.
 
-Dell
IP IP Logged
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