Click here to Skip to main content
Rate this: bad
good
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 1-Mar-13 0:10am
ankur7891.4K
Edited 1-Mar-13 3:57am
v2
Comments
Pranit Kothari at 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
0 Sergey Alexandrovich Kryukov 6,434
1 OriginalGriff 6,178
2 Peter Leow 2,534
3 Abhinav S 2,274
4 Maciej Los 2,268


Advertise | Privacy | Mobile
Web04 | 2.8.150414.1 | Last Updated 2 Mar 2013
Copyright © CodeProject, 1999-2015
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