Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. pull method of crystal report..promptin for password.

pull method of crystal report..promptin for password.

Scheduled Pinned Locked Moved Windows Forms
database
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VB Net Developer
    wrote on last edited by
    #1

    I am using pull method for viewing a crystal report. It works fine but it doesnt refresh the data..it still shows the old data. so i wrote some code to refresh the data..but it is prompting me for password...wen we give password it works..but even wen i give that password in code, it is prompting.. below is my code Dim rptDoc As New ReportDocument rptDoc.Load("test.rpt") ApplyInfo(rptDoc) CrystalReportViewer1.ReportSource = rptDoc Public Sub ApplyInfo(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument) Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo() oCRConnectionInfo.DatabaseName = _dbName oCRConnectionInfo.ServerName = _serverName oCRConnectionInfo.UserID = _userID oCRConnectionInfo.Password = _passWord For Each oCRTable In oCRTables oCRTableLogonInfo = oCRTable.LogOnInfo oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo oCRTable.ApplyLogOnInfo(oCRTableLogonInfo) Next End Sub

    A 1 Reply Last reply
    0
    • V VB Net Developer

      I am using pull method for viewing a crystal report. It works fine but it doesnt refresh the data..it still shows the old data. so i wrote some code to refresh the data..but it is prompting me for password...wen we give password it works..but even wen i give that password in code, it is prompting.. below is my code Dim rptDoc As New ReportDocument rptDoc.Load("test.rpt") ApplyInfo(rptDoc) CrystalReportViewer1.ReportSource = rptDoc Public Sub ApplyInfo(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument) Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo() oCRConnectionInfo.DatabaseName = _dbName oCRConnectionInfo.ServerName = _serverName oCRConnectionInfo.UserID = _userID oCRConnectionInfo.Password = _passWord For Each oCRTable In oCRTables oCRTableLogonInfo = oCRTable.LogOnInfo oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo oCRTable.ApplyLogOnInfo(oCRTableLogonInfo) Next End Sub

      A Offline
      A Offline
      Adam R Harris
      wrote on last edited by
      #2

      I had an issue similar to this awhile ago, i cant remember the exact code but you need to loop (Recursivly) through all the subreports and set the credentials for them aswell.

      If at first you don't succeed ... post it on The Code Project and Pray.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups