locked
CrystalReport:- The report you requested requires further information. RRS feed

  • Question

  • User-792119821 posted

    Hi Guys


    i am trying crystal report first time and i used xsd file  in this example and when  i tried to run this example at that time i got one page which ask me a database name and user name and password but It not allow me to write Database name.and it have one check box of integrated security. so now what to do i get stucked plz can any one help me?i have tried on other pc to but i got same request page.i want a solution which not ask me this id pass all the time.


    Tuesday, August 31, 2010 8:40 AM

Answers

  • User-1852462877 posted

    I had a similar problem but was able to solve it as below:

        <form id="form1" runat="server">
        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
            AutoDataBind="True" EnableDatabaseLogonPrompt="False" Height="1039px" 
            ReportSourceID="CrystalReportSource1" Width="901px" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="CrystalReport.rpt">
            </Report>
        </CR:CrystalReportSource>
        </form>


    Code Behind:

            Dim reportDocumentObj As New ReportDocument
            reportDocumentObj.Load(Server.MapPath("~/CrystalReport.rpt"))
            Dim dt As New DataSet1.usrDataTable
            Dim da As New DataSet1TableAdapters.usrTableAdapter
            'Dim dr As dematFormDataset.tblnewDematRow = Session("currentrow")
            da.Fill(dt)
            reportDocumentObj.SetDataSource(CType(dt, DataTable))
            CrystalReportViewer1.ReportSource = reportDocumentObj
    


    I use datasets/datatables.... have your binding accordingly

    See Ya!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 31, 2010 1:49 PM

All replies

  • User-1852462877 posted

    I had a similar problem but was able to solve it as below:

        <form id="form1" runat="server">
        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
            AutoDataBind="True" EnableDatabaseLogonPrompt="False" Height="1039px" 
            ReportSourceID="CrystalReportSource1" Width="901px" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="CrystalReport.rpt">
            </Report>
        </CR:CrystalReportSource>
        </form>


    Code Behind:

            Dim reportDocumentObj As New ReportDocument
            reportDocumentObj.Load(Server.MapPath("~/CrystalReport.rpt"))
            Dim dt As New DataSet1.usrDataTable
            Dim da As New DataSet1TableAdapters.usrTableAdapter
            'Dim dr As dematFormDataset.tblnewDematRow = Session("currentrow")
            da.Fill(dt)
            reportDocumentObj.SetDataSource(CType(dt, DataTable))
            CrystalReportViewer1.ReportSource = reportDocumentObj
    


    I use datasets/datatables.... have your binding accordingly

    See Ya!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 31, 2010 1:49 PM
  • User-792119821 posted

    Ty CandorZ your given solution works for me .ty very much.

    Monday, September 6, 2010 1:40 AM
  • User-1841574631 posted

    Hi Guys,

    I am facing the same problem but my case is different though.

    I am using InterSystems CACHE as Database and Crystal Report with ASP.Net 2.0. My Reports datasource is ODBC (RDO) datasource.

    I am trying to view Crystal Report using Crystal Report Viewer. 

    Here is my code

    private void ViewCrystalReport()
        {
            try
            {
                FullReportPath = (string)ViewState["FullPath"];
                rpt = new ReportDocument();
                rpt.Load(FullReportPath);
                reportParameterFieldDefinitions = rpt.DataDefinition.ParameterFields;
                int count = reportParameterFieldDefinitions.Count;
               ConnectionInfo connectionInfo = new ConnectionInfo();
                connectionInfo = GetConnectionStringDetails();
                
                Tables CRepTBLS = rpt.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table repTable in CRepTBLS)
                {
                    TableLogOnInfo login = repTable.LogOnInfo;
                    login.ConnectionInfo = connectionInfo;
                    repTable.ApplyLogOnInfo(login);
                }
                for (int i = 0; i < CrystalReportViewer1.LogOnInfo.Count; i++)
                {
                    CrystalReportViewer1.LogOnInfo[i].ConnectionInfo = connectionInfo;
                }
                        
                //Simply display Report in Report Viewer
                CrystalReportViewer1.ReportSource = rpt;

    private void ViewCrystalReport()

        {

            try

            {

                String FullReportPath = (string)ViewState["FullPath"];

                rpt = new ReportDocument();

                rpt.Load(FullReportPath);

               ConnectionInfo connectionInfo = new ConnectionInfo();

                connectionInfo = GetConnectionStringDetails(); //This method gets connectionInfo 

                

                Tables CRepTBLS = rpt.Database.Tables;

                foreach (CrystalDecisions.CrystalReports.Engine.Table repTable in CRepTBLS)

                {

                    TableLogOnInfo login = repTable.LogOnInfo;

                    login.ConnectionInfo = connectionInfo;

                    repTable.ApplyLogOnInfo(login);

                }

                //Simply display Report in Report Viewer

                CrystalReportViewer1.ReportSource = rpt;

    }

    I do not have any information about Report Parameters so I leave it to Crystal Report to ask for parameters at run time. So if Crystal Report has got parameters it it displays Parameter Prompt first and then depending on Parameter values it displays the Report. 

    It works but only locally. If I try to run my Website under Localhost or say access it from other machine if the Report has got parametrs after displaying Parameter prompt it displays "Login Prompt" and asks for Servername and password etc. and evenif I enter those details it doesn't do anything.

    Please not that if Crystal Report doesn't have Parameter then it works fine both locally and on server. It only asks for Logon Details if report has parameters and also only on server.

    Any help will be very much appreciated... I am stuck at it from last 2 days and can't find anything..

    Please help guys..

    Thanks.


    Wednesday, September 8, 2010 11:37 PM
  • User-1841574631 posted

    Guys,


    I finally fixed it on my own... 

    My DSN was User DSN and not a System DSN so wan't working on Server.

    I created a SystemDSN and it works now.

    Thanks Anyway.

    Thursday, September 9, 2010 12:08 AM