Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Sorry Sir/Madam
As I am the first time user for your site, I dont understand hou to get the answer that I have posted recently. If you help me using my email
email removed
I shall be highly obliged

What I have tried:

because the report viewing successfully and after 60 times of viewing a particular rpt then I found the error LOAD REPORT FAILED
'------------------------------------------------------------
Function SELECT_AND_RET_DATASET(ByVal DT_ As DataSet, ByVal TABLE As String, ByVal COL As String, ByVal ord As String, ByVal con_type As String) As DataSet
        If cn_sql.State = ConnectionState.Open Then
            Threading.Thread.Sleep(100)
            DT_ = SELECT_AND_RET_DATASET(DT_, TABLE, COL, ord, con_type)
        End If
        cn_sql.ConnectionString = datastruct_log()
        cn_sql.Open()
        DT_ = New DataSet
        If ord = "" Then
            adp_sql = New MySqlDataAdapter("select " & COL & " from " & TABLE & "", cn_sql)
        Else
            adp_sql = New MySqlDataAdapter("select " & COL & " from " & TABLE & " order by " & ord & "", cn_sql)
        End If
        Dim ffd As String = "select " & COL & " from " & TABLE & " order by " & ord & ""
        adp_sql.Fill(DT_, "" & TABLE & "")
        cn_sql.Close()
        Return DT_
    End Function

'------------------------------------------------------------



ds6 = SELECT_AND_RET_DATASET(ds6, "sal_print", "*", "", "")
For Each dr In ds6.Tables(0).Rows
    dr("col99") = _cstr
Next

cr.SetDataSource(ds6.Tables(0))
Dim f As New frmViewReport
f.CrystalReportViewer1.ReportSource = cr
f.CrystalReportViewer1.Zoom(1)
If frm_add_sale.PrintView_Opt = "Y" Then
   f.cmd_print_Click(New Object(), New System.EventArgs())
Else
  f.ShowDialog()
End If
Posted
Updated 2-May-23 1:50am
v4
Comments
Richard Deeming 27-Apr-23 4:24am    
1) You haven't posted anything before this question.

2) Help happens on the site, or not at all. Nobody is going to email you to provide private consultation and support.

3) If you don't provide the details of the code you're running, the precise error you're getting, what you have tried, and where you are stuck, then nobody can help you.
Member 15627495 27-Apr-23 6:55am    
the concerned 'report' could have less datas than all the others.
leading to an error of loading .

check all contents, are invoke datas all existing ?
Member 15627495 27-Apr-23 7:47am    
Dim f As New frmViewReport // init

f.CrystalReportViewer1.ReportSource = cr // setting
f.CrystalReportViewer1.Zoom(1) // setting


If frm_add_sale.PrintView_Opt = "Y" Then

   f.cmd_print_Click(New Object(), New System.EventArgs()) // action
Else

  f.ShowDialog() // action

End If

// at end of use for 'f'
f = nothing // delete from memory
// or
f.dispose() // delete from memory if 'f' is Disposable
Dave Kreskowiak 27-Apr-23 8:25am    
"LOAD REPORT FAILED" is about as generic an error message as you can get with Crystal Reports. It can mean a whole lot of things, from an actual problem with loading the report file to a problem with the datasource you try to bind to it, like a DataSet with no tables in it.

Since you don't show the code for the SELECT_AND_RET_DATASET method, it's impossible to say anything about what it may be doing, or not doing correctly.

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