Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2004, 09:56 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default Windows Authentication prob pl help

Hi
I am working on crystall reports in ASP.net.When try to connect my local sqlserver using sa account my report is working fine.
When i try connect anothe sql server (which is reside on some other machine) using window authentication i am getting invalid table number error.When i debug my code its giving error at CrTable.Location line.here i am giving my code pl pl help me.

thanks

Dim rptAttendance As New ReportDocument
Dim strDBServer As String
Dim strDBName As String
Dim strUserName As String
Dim strPassword As String
Dim strReportFilePath As String
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim TableCounter

Dim crReportDocument As New ReportDocument
strReportFilePath = Request.MapPath("").ToString
strReportFilePath = strReportFilePath & "\" & "test2.rpt"
crReportDocument.Load(strReportFilePath)

strDBServer = "Acc"
strDBName = "Sales"

With crConnectionInfo
.ServerName = strDBServer
.DatabaseName = strDBName
End With

CrTables = crReportDocument.Database.Tables

'Loop through each table in the report and apply the
'LogonInfo information

For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
CrTable.Location = strDBName & ".dbo." & CrTable.Location.Substring (CrTable.Location.LastIndexOf(".") + 1)
Next
CrystalReportViewer1.DisplayToolbar = True
CrystalReportViewer1.DisplayPage = True
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.ReportSource = crReportDocument







Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Authentication OrbitalThread .NET Framework 2.0 0 December 5th, 2006 01:57 PM
Prob with WEB application when uncheck windows aut msrnivas .NET Web Services 2 July 14th, 2004 10:05 PM
Windows authentication eresina General .NET 5 June 2nd, 2004 09:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.