Error ... accessing data or Generatin page

edited December 2016 in FastReport .NET
Hello!

I'm using IBM server and DB2.


I have some problem.
When i create a report in VB.NET, accessing data or Generatin page massage after do not working.. and than windows Error.
Strangely rarely working well!

Has anyone received such an error? How to solved problem.
I made the FastReport.DB2.dll file in development computer. and register using the FastReport IDE. and add the "FastReport.DB2.dll" reference to VB.NET project

IBM engineer said, "Server and DB2 is good working. Server sent information to my computer, but maybe.. FR can't make report"
FR Supporter no answer to me..

Comments

  • edited 6:03AM
    you need FastReport.DB2.dll only if fastreport designer directly connect to database (you create datasource in fastreport designer)

    alternatively, make sure "IBM Data Server Provider for .NET" is working, try to connect dotnet application to db2, this code will open designer from your dotnet application
                Using cnn As New OleDbConnection(mySQLConnString)
                    cnn.Open()
    
                    Using cmd As New OleDbCommand()
                        cmd.Connection = cnn
                        cmd.CommandType = CommandType.Text
                        cmd.CommandText = "SELECT * FROM qryPrintSuspend"
                        cmd.Parameters.AddWithValue("@selID", argID)
    
                        Using dr As OleDbDataReader = cmd.ExecuteReader()
                                Using dt As New DataTable()
                                    dt.Load(dr)
                                    dt.TableName = "MainReport"
    
                                    report.Load("PrintSuspend.frx")
                                    report.FileName = "Print Temporary Transaction"
                                    report.RegisterData(dt, dt.TableName)
    
    
    
                                    'you need this code to open the designer and use datasource from code
                                    report.GetDataSource(dt.TableName).Enabled = True
                                    Dim band1 As FastReport.DataBand = CType(report.FindObject("Data1"), FastReport.DataBand)
                                    band1.DataSource = report.GetDataSource(dt.TableName)
                                    report.Design(True)
    
    
    
                                End Using
                        End Using
                    End Using
                End Using
    

  • edited 6:03AM
    Hello Thanks for your help

    I'm korean. I can't English very well ^^;;


    I fastreport designer directly connect to database. and i created datasource in fastreport designer.

    Because it is a very complex report. and using many databands.

    I have to solve the problem!!>....


    I try your code. changed VB.NET
    But A well-behaved report will fail.


  • edited 6:03AM
    i use google to translate your picture of errors, but the popup error can't tell a story. My guess:
    1. IBM Data Server Provider for .NET instead of FastReport.DB2.dll
    2. learn how to push datasource from .net code to fastreport
    3. resolve complex query in stored procedures, call stored procedures from .net code, push single 'select query' to fastreport

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.