Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: The report you requested requires further informat Post Reply Post New Topic
Author Message
kobala123
Newbie
Newbie


Joined: 21 Apr 2009
Location: Vietnam
Online Status: Offline
Posts: 1
Quote kobala123 Replybullet Topic: The report you requested requires further informat
    Posted: 21 Apr 2009 at 8:14pm
Hi, everyone
I'm a beginner! i have a problem wit Crystal Report v10.  I design Crystal Report and when i run it. it show info below:



The report you requested requires further information.


  localhost
Server name:  < ="" name="Name-localhost" value="localhost" maxlength="255" style="border-style: inset;" readonly="readonly" ="text">
Database name:  < ="" name="Name-localhost" value="" maxlength="255" style="border-style: inset;" readonly="readonly" ="text">
User name:  < ="" id="User-localhost" name="User-localhost" value="" maxlength="255" style="border-style: inset;" ="text">
Password:  < ="" name="-localhost" maxlength="255" style="border-style: inset;" ="">
< ="" style="border-style: none;" name="UseIntegratedSecurity-localhost" =""> Use Integrated Security 

< ="" style="border-style: outset;" value="Log On" ="submitLogonValues()" ="">

Here my code behind:


 TableLogOnInfo myLogOnInfo = new TableLogOnInfo();
        CrystalReportViewer1.LogOnInfo = new TableLogOnInfos();
        myLogOnInfo.ConnectionInfo.ServerName = @"localhost";
        myLogOnInfo.ConnectionInfo.DatabaseName = "ERPapps";
        myLogOnInfo.TableName = "tblNhanVien";
        myLogOnInfo.ConnectionInfo.UserID = "";
        myLogOnInfo.ConnectionInfo.Password = "";

        

        string strQuery = " SELECT NhanVien.MaNV, NhanVien.HoNV, NhanVien.TenNV, NhanVien.NgaySinh, NhanVien.GioiTinh, PhongBan.TenPhongBan FROM NhanVien INNER JOIN   PhongBan ON NhanVien.MaPhong = PhongBan.MaPhong";
        DataSet dsNhanVien = new DataSet();
        SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(strQuery, ConfigurationManager.ConnectionStrings["ERPappsConnectionString"].ConnectionString);
        sqlDataAdapter.Fill(dsNhanVien,"tblNhanVien");
        ReportDocument rptNhanVien = new ReportDocument();
        //rptNhanVien.SetDatabaseLogon(myLogOnInfo.ConnectionInfo.UserID, myLogOnInfo.ConnectionInfo.Password);
      
        rptNhanVien.Load(Server.MapPath("../RP/rptNhanVien.rpt"));


        CrystalReportSource1.ReportDocument.SetDataSource(dsNhanVien);
        //SetDBLogonForReport(connectionInfo,rptNhanVien);
        Tables tables = rptNhanVien.Database.Tables;
        foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
        {
         
            table.ApplyLogOnInfo(myLogOnInfo);
        }

        CrystalReportViewer1.LogOnInfo.Add(myLogOnInfo);
        CrystalReportViewer1.ReportSource = rptNhanVien;
       
    }

More Info:

I use MSSQL Server 2008, have a Database name ERPapps and no username and Password!

Someone help me!!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.033 seconds.