HI there .
If u r using SQL DATABASE , then y dont u go for sqlclient connectivity. i mean use sqldataadapter and its connectivity , bcz its much more relaible. anyways your problem is no where releted to this topic.
let me show u the code to make the login for crystal report web applications.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>
Dim Rport As New CryRWebForm13
' providing the log on authentication
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo
For Each myTable In Rport.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.ServerName = ServerName
myLogin.ConnectionInfo.DatabaseName = DatabaseName
myLogin.ConnectionInfo.Password = Password
myLogin.ConnectionInfo.UserID = UserName
myTable.ApplyLogOnInfo(myLogin)
Next
Rport.SetDatabaseLogon(UserName, Password, ServerName, DatabaseName)
' username -> database username eg: sa
' password -> DB password eg : ""
' Servarname -> ServerName eg: sqlServer
' Databasename -> Db Name eg: SaudiSystemsDB
' passing parameters
Rport.SetParameterValue("YEAR_ID", lstYear.SelectedValue)
Rport.SetParameterValue("GLOBAL_STATUS", lstGStatus.SelectedValue)
Rport.SetParameterValue("PRO_TYPE", lstType.SelectedValue)
Rport.SetParameterValue("PRO_STATUS", lstStatus.SelectedValue)
'Rport.FormatEngine.PrintOptions.PaperOrientation = PaperOrientation.Landscape
Rport.PrintOptions.PaperOrientation = PaperOrientation.Landscape
' binding the report
CrystalReportViewer1.ReportSource = Rport
CrystalReportViewer1.DataBind()
thts it,
now i think u will get the idea how to go for dynamic reports using web application in dotnet
best of luck
regards
Raza
Mohammed Raza Ullah Khan
|