Skip Navigation Links
Home
Forum Home
Latest 50
Unanswered
Win Prizes
All Time Leaders
Jump to CategoryExpand Jump to Category
Login 
    Welcome Guest!
 Search Forum For :  
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName
   Home » Reporting in VB.NET » not able to get report , asking login credentials
       
Author Reply
S VK
posted 5 posts
since Jan 11, 2010 
from

not able to get report , asking login credentials

  Posted on: 21 Apr 2011       
i hve made a application in vs2005(frame work 2.0 which has crystal report
in my system i have VS2005 software
crytsal report whetver i needed i hve done it a design time ie added the fields needed during design time

i had placed all the reports in folder knw as reports & had given the path accordingly
when i first executed the app;lication & tried to view the report i got a msg something like " reports cann not be displayed , & needs to be in the bin folder of the application"
so i pasted all the reports frm report folder in bin & now its working

my application is working fine but when i try to view the reports it showed me a login dialog box which contained the servername, username & password
though in config file i had specified clinet servername it took the server name of my system & asked for password



code

Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
CrystalReportViewer1.Load

Dim cryRpt As New ReportDocument
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table


With crConnectionInfo

.ServerName = ConfigurationManager.AppSettings("ServerName") 'YOUR SERVER NAME"

.DatabaseName = ConfigurationManager.AppSettings("MainData") 'YOUR DATABASE NAME"

.UserID = ConfigurationManager.AppSettings("User_ID") 'YOUR DATABASE USERNAME"

.Password = ConfigurationManager.AppSettings("Password") 'YOUR DATABASE PASSWORD"

End With

Dim ReportName As String = "cons.rpt"

ReportName = Application.StartupPath & "\" & ReportName & ""

Dim ReportForm As CrystalDecisions.CrystalReports.Engine.ReportDocum ent = New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent

ReportForm.Load(ReportName)

CrTables = ReportForm.Database.Tables

For Each CrTable In CrTables

crtableLogoninfo = CrTable.LogOnInfo

crtableLogoninfo.ConnectionInfo = crConnectionInfo

CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next

CrystalReportViewer1.ReportSource = ReportForm

CrystalReportViewer1.Refresh()

End Sub

Mayur Dighe
posted  58 posts
since  Dec 26, 2010 
from  Pune

 Re: not able to get report , asking login credentials
  Posted on: 28 Apr 2011        0  


if you want to place all Crystal Reports in a folder & want to access it,  then....

        make the ReportName correct as follow...

         Folder--> Report_Folder
       
       
Dim ReportName As String= "..\..\Report_Folder\cons.rpt"

----------------------------------------------------------------------

Your application is working fine but when you try to view the reports it shows you a Login dialog box which contained the ServerName, UserName & Password..
       
        TO avoid Login Dialog Box, you have to make sure that Security parameters for Crystal Reports as INITIALIZED Properly....
       
        e.g.

        Dim crConnectionInfo As New ConnectionInfo

        With crConnectionInfo

                .ServerName = ConfigurationManager.AppSettings("ServerName")
                .DatabaseName = ConfigurationManager.AppSettings("MainData")
                .UserID = ConfigurationManager.AppSettings("User_ID")
                .Password = ConfigurationManager.AppSettings("Password")
                .IntegratedSecurity= True

        End With
----------------------------------------------------------------------------

Note:-
        if problem get solved, make this post as ANSWER
     
Creative_13 Studio:
If you help Someone without any Expectations ,  Somebody else will Definitely help you.


My Blog: ImmortalDotNet.BlogSpot.Com
       
Team Foundation Server Hosting
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Advertise with us
Current Version: 5.2011.3.12
 © 1999 - 2012  Mindcracker LLC. All Rights Reserved