locked
The report you requested requires further information. RRS feed

  • Question

  • User-644256186 posted

    Hi,

    i'm running into a problem where i try to load a crystal report in my web page
    instead of the report loading, a statement " The report you requested requires further information." appears together with a UI that prompts me for the Servername, database name, user name and password.to the server XMLSchema

    is there a configuration which i need to set/offset or is this caused by other reasons?

    i am currently using the following codes to bind a datatable to my crystal report

    <code>

    Dim ds As New DataSet
    ds.Tables.Add(dt)

    Dim rptDocument As ReportDocument
    rptDocument =
    New ReportDocument
    rptDocument.Load(rptFile)
    rptDocument.SetDataSource(ds)

    ReportViewer.ReportSource = rptDocument
    ReportViewer.DataBind()

    </code>

    i tried testing the dt with a gridview - returned me the correct values
    i also tried testing the report location - the view appears when there are NO field objects in my crystal report
    leading me to conclusion that the problem occurs during the actual binding of values

    any help on this?

    Wednesday, December 20, 2006 10:44 PM

Answers

  • User2104673743 posted

    Unfortunately for you, my friend, that´s is not that simple, you need to set the connectionInfo for every table in every subreport like this:

    Private Sub pr_LogOnTables(ByRef crReport As ReportDocument)
            Dim crtableLogoninfos As New TableLogOnInfos
            Dim crtableLogoninfo As New TableLogOnInfo
            Dim crConnectionInfo As New ConnectionInfo
            Dim CrTables As Tables
            Dim CrTable As Table
    
            With crConnectionInfo
                .ServerName = Me.sM_servidorDB
                .DatabaseName = Me.sM_baseDatosDB
                .Password = Me.sM_passwordDB
                .UserID = Me.sM_usuarioDB
                CrTables = crReport.Database.Tables
            End With
            For Each CrTable In CrTables
                Dim sM_objOwner = "dbo"
                crtableLogoninfo = CrTable.LogOnInfo
                crtableLogoninfo.TableName = CrTable.Name
                crtableLogoninfo.ConnectionInfo = crConnectionInfo
                CrTable.ApplyLogOnInfo(crtableLogoninfo)
                Dim sB_LocationCorrecta As Boolean = True
                Try
                    CrTable.Location = Me.sM_baseDatosDB & "." & sM_objOwner & "." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
                Catch
                    sB_LocationCorrecta = False
                End Try
            Next
            Dim CrSections As Sections = crReport.ReportDefinition.Sections
            Dim CrSection As Section
            Dim CrReportObjects As ReportObjects
            Dim CrReportObject As ReportObject
            Dim CrSubReportObject As SubreportObject
            Dim CrSubReportDocument As ReportDocument
            For Each CrSection In CrSections
                CrReportObjects = CrSection.ReportObjects
                For Each CrReportObject In CrReportObjects
                    If (CrReportObject.Kind = ReportObjectKind.SubreportObject) Then
                        CrSubReportObject = CrReportObject
                        CrSubReportDocument = CrSubReportObject.OpenSubreport(CrSubReportObject.SubreportName)
                        CrTables = CrSubReportDocument.Database.Tables
                        For Each CrTable In CrTables
                            Dim sM_objOwner = "dbo"
                            crtableLogoninfo = CrTable.LogOnInfo
                            crtableLogoninfo.TableName = CrTable.Name
                            crtableLogoninfo.ConnectionInfo = crConnectionInfo
                            CrTable.ApplyLogOnInfo(crtableLogoninfo)
                            Dim sB_LocationCorrecta As Boolean = True
                            Try
                                CrTable.Location = Me.sM_baseDatosDB & "." & sM_objOwner & "." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
                            Catch
                                sB_LocationCorrecta = False
                            End Try
                        Next
                    End If
                Next
            Next
        End Sub

     I first log the tables in the main report and then log the tables in the subreports.

    Hope this helps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 21, 2006 4:48 PM

All replies

  • User2104673743 posted

    Unfortunately for you, my friend, that´s is not that simple, you need to set the connectionInfo for every table in every subreport like this:

    Private Sub pr_LogOnTables(ByRef crReport As ReportDocument)
            Dim crtableLogoninfos As New TableLogOnInfos
            Dim crtableLogoninfo As New TableLogOnInfo
            Dim crConnectionInfo As New ConnectionInfo
            Dim CrTables As Tables
            Dim CrTable As Table
    
            With crConnectionInfo
                .ServerName = Me.sM_servidorDB
                .DatabaseName = Me.sM_baseDatosDB
                .Password = Me.sM_passwordDB
                .UserID = Me.sM_usuarioDB
                CrTables = crReport.Database.Tables
            End With
            For Each CrTable In CrTables
                Dim sM_objOwner = "dbo"
                crtableLogoninfo = CrTable.LogOnInfo
                crtableLogoninfo.TableName = CrTable.Name
                crtableLogoninfo.ConnectionInfo = crConnectionInfo
                CrTable.ApplyLogOnInfo(crtableLogoninfo)
                Dim sB_LocationCorrecta As Boolean = True
                Try
                    CrTable.Location = Me.sM_baseDatosDB & "." & sM_objOwner & "." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
                Catch
                    sB_LocationCorrecta = False
                End Try
            Next
            Dim CrSections As Sections = crReport.ReportDefinition.Sections
            Dim CrSection As Section
            Dim CrReportObjects As ReportObjects
            Dim CrReportObject As ReportObject
            Dim CrSubReportObject As SubreportObject
            Dim CrSubReportDocument As ReportDocument
            For Each CrSection In CrSections
                CrReportObjects = CrSection.ReportObjects
                For Each CrReportObject In CrReportObjects
                    If (CrReportObject.Kind = ReportObjectKind.SubreportObject) Then
                        CrSubReportObject = CrReportObject
                        CrSubReportDocument = CrSubReportObject.OpenSubreport(CrSubReportObject.SubreportName)
                        CrTables = CrSubReportDocument.Database.Tables
                        For Each CrTable In CrTables
                            Dim sM_objOwner = "dbo"
                            crtableLogoninfo = CrTable.LogOnInfo
                            crtableLogoninfo.TableName = CrTable.Name
                            crtableLogoninfo.ConnectionInfo = crConnectionInfo
                            CrTable.ApplyLogOnInfo(crtableLogoninfo)
                            Dim sB_LocationCorrecta As Boolean = True
                            Try
                                CrTable.Location = Me.sM_baseDatosDB & "." & sM_objOwner & "." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
                            Catch
                                sB_LocationCorrecta = False
                            End Try
                        Next
                    End If
                Next
            Next
        End Sub

     I first log the tables in the main report and then log the tables in the subreports.

    Hope this helps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 21, 2006 4:48 PM
  • User-644256186 posted

    Hi,

    i have found my solution to the problem through another forum...
    it seems that the problem is that CRXI and VS2005 cannot support using dymanic datasets (.xsd) for some reason... which was what i was using as my data source
    somehow i kind of find changing my datasource from .xsd to .xml simpler than doing that whopping amount of changes...

    for a better explaination and the solution please refer to this very well done article: http://aspalliance.com/776

     

    Monday, December 25, 2006 10:31 PM
  • User2104673743 posted
    ah ok, it must be because you are on the Push model.
    Wednesday, December 27, 2006 12:18 PM
  • User-644256186 posted

    Yes im using the push model...
    at any rate the solution should work regardless of any models being used...

    Thursday, December 28, 2006 10:44 PM
  • User809255920 posted

    Good day,

    Just wanted to say this code did the trick!! I had 7 subreports and had to change to another database. This error kept on coming up even after setting the datasource location

    a number of times.  Many thanks!!

    Tuesday, January 2, 2007 6:27 AM
  • User2104673743 posted
    You are welcome JPretorious, but AnjinG, did you already tryed your reports on a different PC and different database? not the development environment....
    Tuesday, January 2, 2007 8:57 AM
  • User1467207536 posted

    Look at the following link:

    http://aspalliance.com/776

    This solution works like a charm. Definately work trying.

    Friday, December 7, 2007 4:46 PM
  • User589342671 posted

    i faced same problem and i solve it by verifying the DataSet location path, from the crystal report itself .. in the Field Explorer right click the report datasource and then select set data source location , at that point locate your dataset and click update . to confirm that you are reading from the correct dataset , in the Current Data Source area expand your dataset then select and expand Properties find File Path property .it should be set to the correct dataset path.

    Wednesday, July 20, 2011 3:30 AM