Click here to Skip to main content
12,503,681 members (55,356 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
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

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 28-Feb-13 23:10pm
ankur7891.5K
Updated 1-Mar-13 2:57am
v2
Comments
Pranit Kothari 1-Mar-13 8:59am
   
Why down votes? Seems to be valid question..

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 2 Mar 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100