how to display multi data?

hi,

I have a question, there is my code...

            Dim report As New FastReport.Report
            report.RegisterData(dt, "dt1")

            Dim databand As FastReport.DataBand = WebReport1.Report.FindObject("data1")
            Dim datatext As FastReport.TextObject = WebReport1.Report.FindObject("text1")

            databand.DataSource = report.GetDataSource("dt1")
            datatext.Text = "[dt1.id]"

            WebReport1.Report.RegisterData(dt, "dt1")

(gridview and WebReport both datasource are datatable name dt1. )


the return rows data are all the same. how can i display all data different? thanks.

Regards.


Comments

  • edited 10:19AM
    Hello,

    You should access WebReport.Report in the WebReport.StartReport event only. Here is the event code that should work:
    Dim report As FastReport.Report = WebReport1.Report
    report.RegisterData(dt, "dt1")
    
    Dim databand As FastReport.DataBand = report.FindObject("data1")
    Dim datatext As FastReport.TextObject = report.FindObject("text1")
    
    databand.DataSource = report.GetDataSource("dt1")
    datatext.Text = "[dt1.id]"
    
  • edited 10:19AM
    AlexTZ wrote: »
    Hello,

    You should access WebReport.Report in the WebReport.StartReport event only. Here is the event code that should work:
    Dim report As FastReport.Report = WebReport1.Report
    report.RegisterData(dt, "dt1")
    
    Dim databand As FastReport.DataBand = report.FindObject("data1")
    Dim datatext As FastReport.TextObject = report.FindObject("text1")
    
    databand.DataSource = report.GetDataSource("dt1")
    datatext.Text = "[dt1.id]"
    


    hi,AlexTZ

    thank you for quickly answer,its work correct. >

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.