Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All,
Am getting the issue '
the report requested requires further information
'.

I've searched and the solution is to replace dataset with a dataTable, however i haven't been able to get a tutorial on how to do same.
Below is my code in vb.net.
VB
myRrpt.Load(Server.MapPath("~\Reporting\CrystalReport15.rpt"))

connect_EWS.ConnectionString = Constr_EWS
Dim con As New SqlCommand
Dim query As String = "SELECT * from Report_BT where Number=@num"
con.CommandText = query
con.Connection = connect_EWS
con.Parameters.AddWithValue("@num", txtNumber.Text.Trim)
connect_EWS.Open()
'  Dim dsCustomers As New ISAE_BankTransfer
Dim da As New SqlDataAdapter(con)

Dim dsCustomers As DataSet4 = New DataSet4

da.Fill(dsCustomers, "Report_BT")
connect_EWS.Close()

myRrpt.SetDataSource(dsCustomers)
CrystalReportViewer1.DisplayPage = True

CrystalReportViewer1.ReportSource = myRrpt

can someone please help me out
using latest crystal reporting software for vb.net
thanks in advance

What I have tried:

can someone please help me out
Posted
Updated 24-Aug-17 23:48pm
v2
Comments
Michael_Davies 25-Aug-17 4:01am    
The DataSet contains at least one Table, use that.

myRrpt.SetDataSource(dsCustomers.Tables(0))

Instead of the index you can use the table name.
Bocus Iqbal 25-Aug-17 4:43am    
Hello Michael_Davies,
am still getting the message below when moving to the second page in CR
'the report requested requires further information'
what change i need to do in my code above to stop this message displaying.
Michael_Davies 25-Aug-17 4:58am    
Then it is not a table vs dataset issue as per the title of your question.
Graeme_Grant 25-Aug-17 6:10am    
Does this help? [^]

1 solution

According to: Microsoft Docs - DataSet Class[^]
Quote:
The DataSet, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture. The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects.

And the example below is from here: Microsoft Docs - DataSet.Tables Property[^]
VB
Private Sub PrintRows(ByVal dataSet As DataSet)
   Dim table As DataTable
   Dim row As DataRow
   Dim column As DataColumn
   ' For each table in the DataSet, print the row values.
   For Each table in dataSet.Tables
      For Each row In table.Rows
         For Each column in table.Columns
            Console.WriteLine(row(column))
         Next column
      Next row
   Next table
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900