cancel
Showing results for 
Search instead for 
Did you mean: 

login page Authentication

Former Member
0 Kudos

Hello Folks

I need to pass the login token along with the URL so that the users are not challenged to enter login credentials.How can I do that using .Net ?Can any one help me regarding this?

Thanks

denlion

Accepted Solutions (1)

Accepted Solutions (1)

former_member184995
Active Contributor
0 Kudos

You gave us no information as to what you are actually doing.

What product and version?

What URL are you talking about (opendocument, viewrpt, Infoview, etc)?

Former Member
0 Kudos

Hello

I am sorry about that

It's XI 3.1

and I am talking about OpenDocument?

Can you please help on this?

Former Member
0 Kudos

Thank you very much for your reply

Former Member
0 Kudos

I used GetDocumentInformation to open the document and I want to use OpenDoc to open the document .And I want to open in the flash file format....Is there any way to open the flash file?I have the flash file.

Former Member
0 Kudos

I want to use OpenDocument URL to view the report by passing the user credentials with token

I want to get rid of the login page

Can you help me how to open the document with Opendocument url?

former_member184995
Active Contributor
0 Kudos

The forums will not let me post the code so I have attached an rtf file that has it.

Jason

Former Member
0 Kudos

I tried to download the zip file but there is no file in that .When I tried to extract it says no files to extract.

former_member184995
Active Contributor
0 Kudos

To create a logon token for the OpenDocument page, use the VB.NET sample code below:

=================

'Add the following refernces to the project.

CrystalDecisions.Enterprise.Framework

CrystalDecisions.Enterprise.Infostore

'Add the following Name space to the top of the code page.

Imports CrystalDecisions.Enterprise

=================

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
'Enterprise Session Manager Variables
      Dim ceSessionMgr As New SessionMgr
      Dim ceSession As EnterpriseSession
      Dim ceToken As String 
'Enterprise Credential Variables
      Dim apsUser As String = "Administrator" 'Valid User ID
      Dim apsPassword As String = "" 'Valid User Password
      Dim cmsName As String = "myInfoviewServer" 'Server running Infoview
      Dim apsAuthType As String = "secEnterprise" 'Authorization Type 
'URL Reporting Report Variables
      Dim ceEnterpriseService As EnterpriseService
      Dim ceInfoStore As InfoStore
      Dim ceReportObjects As InfoObjects 
'********************
      'Report is being hard coded in this example.
      'You can use other approaches to populate the reportid variable.
      'Your reportid values will be different.
      '********************
      'Choose a valid report ID. The 'World Sales Report' reportID may not be 306 on your system
      Dim reportid As String = "306" ' 'World Sales Report' - basic report, no parameters
      Dim sQuery As String 
'Create Logon Token for use with Open Document method
      Try
      'logon to Enterprise
      ceSession = ceSessionMgr.Logon(apsUser, apsPassword, cmsName, apsAuthType) 
'create the security token for this logon
      ceToken = ceSession.LogonTokenMgr.CreateLogonTokenEx("", 30, 100) 
Catch err As Exception
      'error logging on
      lblError.Text = err.Message
      End Try 
'Use Logon Token to build URL to view report with Open Document method
      Try
      'Logon with the token
      ceSession = ceSessionMgr.LogonWithToken(ceToken.ToString)
      ceEnterpriseService = ceSession.GetService("", "InfoStore")
      ceInfoStore = New InfoStore(ceEnterpriseService) 
'Use query to confirm report is in crReportObjects collection
      sQuery = "Select * From CI_INFOOBJECTS Where SI_ID=" + reportid
      ceReportObjects = ceInfoStore.Query(sQuery) 
'check for returned reports
      If ceReportObjects.Count > 0 Then 


'Business Objects Enterprise 3.1 Open Document URL

     Response.Redirect(" http://myInfoviewServer/OpenDocument/opendoc/opendocument.aspx?token=" + ceToken + "&iDocID=" + reportid)

     'See the Business Objects Enterprise 3.1 Open Document white paper for

     'additional URL parameters - xi3-1_url_reporting_opendocument_en.pdf

     'http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf
Else
      'no objects returned by query
      Response.Write("No report objects found by query <br>")
      Response.Write("Please click <a href='Default.aspx'>here</a> to return to the start page.<br>")
      End If 
Catch err As Exception
      Response.Write("There was an error: <br>")
      Response.Write(err.Message.ToString + "<br>")
      End Try 
End Sub

Former Member
0 Kudos

Hello Jason ,

Sorry to mention I forgot to mention that I am using WebI reports

Thank you

denlion

former_member184995
Active Contributor
0 Kudos

That doesnt matter as the code is the same.

What kind of report you are viewing has nothing to do with creating a logon token.

Where, when and how are you using opendocument?

What does webi have to do with the opendocument call you are using?

What are you doing with flash files?

Edited by: Jason Everly on Sep 8, 2010 4:05 PM

Former Member
0 Kudos

Private Sub myOpenDocument()

Dim lProceed As Boolean

lProceed = False

sTool = sTool & "Retrieving the InfoObject..."

Dim query As String

query = "query://{SELECT TOP 1 * FROM CI_INFOOBJECTS WHERE SI_NAME='" & sDocName & "' AND SI_INSTANCE=0}"

Dim bowsResponseHolder As BusinessObjects.DSWS.BIPlatform.ResponseHolder

bowsResponseHolder = bowsBiPlatform.Get(query, Nothing)

Dim bowsInfoObjects As BusinessObjects.DSWS.BIPlatform.Desktop.InfoObjects

If Not bowsResponseHolder Is Nothing Then

bowsInfoObjects = bowsResponseHolder.InfoObjects

If Not bowsInfoObjects.InfoObject Is Nothing Then

lProceed = True

End If

End If

If lProceed Then

Dim bowsWebi As BusinessObjects.DSWS.BIPlatform.Desktop.WebI

bowsWebi = bowsInfoObjects.InfoObject(0)

Dim sDocCuid As String

sDocCuid = bowsWebi.CUID

sTool = sTool & "WebI document [" & bowsWebi.Name & "] found!<BR>"

'----


sTool = sTool & "Opening the WebI document..."

Dim bowsDocumentInformation As BusinessObjects.DSWS.ReportEngine.DocumentInformation

bowsDocumentInformation = bowsReportEngine.GetDocumentInformation(sDocCuid, Nothing, Nothing, Nothing, Nothing)

'bowsDocumentInformation = b

sDocumentReference = bowsDocumentInformation.DocumentReference

session.Add("SAMPLE.sDocumentReference", sDocumentReference)

sTool = sTool & "Successful!<BR>"

Else

sTool = sTool & "WebI document [" & sDocName & "] not found!<BR>"

End If

End Sub

This is the code I am using to open the doucment ...

Former Member
0 Kudos

To view my report right now I am using HTML . I need to open a flash file

Dim bowsViewSupport as New BusinessObjects.DSWS.ReportEngine.ViewSupport

bowsViewSupport.OutputFormat = OutputFormatType.HTML

bowsViewSupport.ViewType = ViewType.CHARACTER

bowsViewSupport.ViewMode = ViewModeType.REPORT_PAGE

I am using this code to view in html

Thanks

denlion

Former Member
0 Kudos

Hello Jason

I dint find the references to add in my project I have

BusinessObjects.DSWS.BIPlatform.dll

BusinessObjects.DSWS.ReportEngine.dll

BusinessObjects.DSWS.Session.dll

Thanks

denlion

Former Member
0 Kudos

I am bit confused with the Crystal Reports OpenDocument

Former Member
0 Kudos

I am unable to add the references.

Adam_Stone
Active Contributor
0 Kudos

It may be best to create a case through Service Market Place for this issue as it will be easier to step through the issue you are encountering over the phone.

When creating a case, try to include as much detail about the situation as possible.

Former Member
0 Kudos

Hello Jason,

Thank you very much and I am able to open the flash files using Enterprise SDK and I need to open the flash files using webservice SDK ?Can you help me regarding opening the flash file using Webservice SDK?

Thanks

denlion

Answers (0)