Subject: Crystal Web Report asking User name/password
Posted By: abmohan75 Post Date: 12/12/2005 5:36:03 AM

Hello!
I am having CR Ver 7.0/Win 2000 Server/SQL Server 2000, and from php I am calling Crystal Report. I am passing username and password also. But it is asking database user name and password more than 5
times in a single page. After giving also it is not opening the report and again it is asking the same.
If any one suggest to solve it, it will be highly appreciated.
Thanks and Regards,
Mohan
Reply By: connect2sandep Reply Date: 12/20/2005 5:55:53 AM
create an ODBC connection to the databse and using report expert maintain a link with the database

Reply By: raza_mrk36 Reply Date: 1/22/2006 3:40:09 AM
Dear Brother.
I never Worked on PHP, but i am working on DOtnet .
In Dotnet i used Crystal REport viewer, and i worked on dynamic creation of reports also.
so i think its my duty to show u how i worked in that,
Firstly , ur problem is in Login department.
So it means that , ur code may not be having enough logon info. splly in crystal reports we have to provide the logon info for every table and then for the report.
i will show u a  sample here..............

Dim Rport As New CryRpt20
            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
            CrystalReportViewer1.Visible = True
            Rport.SetDatabaseLogon(UserName, Password, ServerName, DatabaseName)


            Rport.SetParameterValue("YEAR_ID", lstYear.SelectedValue)
            Rport.SetParameterValue("CAT_DESC", lstcat.SelectedValue)
            Rport.SetParameterValue("GLOBAL_STATUS", lstGStatus.SelectedValue)
            CrystalReportViewer1.ReportSource = Rport
            CrystalReportViewer1.DataBind()


Username is the Global variable .and password and so on ... all this info abt the logoin are global variables.

hope u get my point,
bye

Mohammed Raza Ullah Khan

Go to topic 14411

Return to index page 389
Return to index page 388
Return to index page 387
Return to index page 386
Return to index page 385
Return to index page 384
Return to index page 383
Return to index page 382
Return to index page 381
Return to index page 380