I cant seem to login into my crystal report viewer.
It wants me to login with the user name and the password.
I've already provided the UN and the PW during the crystal report database connection.
I really do not know why it fails.

I only have these codes.

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cryRpt As New ReportDocument
        cryRpt.Load("C:\Users\Anonymous\Documents\BACK UP\Visual Studio 2008\Projects\AMAFinancialMonitoringSystem\AMAFinancialMonitoringSystem\CrystalReport2.rpt")
        CrystalReportViewer1.ReportSource = cryRpt
        CrystalReportViewer1.Refresh()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

Am I missing something?
I am using visual basic 2008. MS access database

Recommended Answers

All 4 Replies

hello!
use this code before this CrystalReportViewer1.ReportSource = cryRpt

With crConnectionInfo
            .ServerName = "YOUR SERVER NAME"
            .DatabaseName = "YOUR DATABASE NAME"
            .UserID = "YOUR DATABASE USERNAME"
            .Password = "YOUR DATABASE PASSWORD"
        End With

i hope this will solve your prob :)
Please if your prob is solved the mark this thread solved and vote me up :)
Regards

It says CrConnectioninfo is not declared. :\

This is what I am encountering - http://i39.tinypic.com/33x9gmq.jpg

Which is I havent put in any username or password in it to begin with.
The question is why is it still asking me a UN and a PW?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.