Click here to Skip to main content
15,885,842 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Dear Sir/Ma'am

I am using asp.net with av as language ,visual studio 2005 and sql enterprise 2000

when i m creating crystal report it ask always for server name database etc and database field remains uneditable and blank sir i am using

VB
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        crypt = New ReportDocument
        crtableLogoninfos = New TableLogOnInfos()
        crtableLogoninfo = New TableLogOnInfo()
        crConnectionInfo = New ConnectionInfo()
        crypt.Load("C:\Documents and Settings\ankur\My Documents\Visual Studio 2005\WebSites\WebSite4\CrystalReport.rpt")
        crConnectionInfo.ServerName = "."
        crConnectionInfo.DatabaseName = "fee_srms"
        crConnectionInfo.UserID = "sa"
        crConnectionInfo.Password = "database"
        crtables = crypt.Database.Tables

        For Each crtable In crtables
            crtableLogoninfo = crtable.LogOnInfo
            crtableLogoninfo.ConnectionInfo = crConnectionInfo
            crtable.ApplyLogOnInfo(crtableLogoninfo)

        Next crtable
        
        CrystalReportViewer1.ReportSource = crypt


    End Sub


Please help me regarding this
Posted
Updated 1-Mar-13 2:57am
v2
Comments
[no name] 1-Mar-13 8:59am    
Why down votes? Seems to be valid question..

1 solution

You may have not giving DB name and its password while in that particular Crystal report.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900