use datatable in fastreport.net issue

dear sir:

sorry, i write wrong topic [drop drog issue]

this is new topic.


I want to display a report in my web project,so

I use the fastreport.net ver 1.2.40 in my web vb project

and I read the sample FastReport.Net Programmer's manual pdf

then I do something like this

1.I put the button and fastreport.net control in my aspx (a.png)

and

2.I design my sample code like this (source is datatable)
dt schema is ("id","name","code")

when Button_Click

Dim dt As New DataTable
dt = MajorDBMajor_DataTable("11", "major", "CSIE_096_005")

Dim report As New FastReport.Report
'report.RegisterDataAsp(dt, "dt")
wrote:
and I have a question is the " when I design the webap use FastReport control

I should use RegisterDataAsp or RegisterData ? "

report.RegisterData(dt, "dt")
WebReport1.Report = report


3.I design fastreport like this picture (b.png)
4.I get return error (c.png)




how can I fix this issue? thank you.
a.png 13.9K
b.png 73.1K
c.png 43.9K

Comments

  • edited 6:30PM
    Hello,

    You have to run this code inside the WebReport.StartReport event, not in the button_click:

    Dim dt As New DataTable
    dt = MajorDBMajor_DataTable("11", "major", "CSIE_096_005")
    WebReport1.Report.RegisterData(dt, "dt")
  • edited November 2009
    AlexTZ wrote: »
    Hello,

    You have to run this code inside the WebReport.StartReport event, not in the button_click:

    Dim dt As New DataTable
    dt = MajorDBMajor_DataTable("11", "major", "CSIE_096_005")
    WebReport1.Report.RegisterData(dt, "dt")

    Hi,AlexTZ..

    thank you for your help, [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> My issue has been resolved . but... there is new issue....lOl... the report just show one data... my datatable rows count=4 ,so the report should show 4 multiple data... the gridview and WebReport datasource is the same datatable. report text1.text=[dt.idno] how can I fix this issue? thank you.[/img]
    1.png 16.9K
  • edited 6:30PM
    Jiasheng wrote: »
    Jiasheng wrote: »
    Hello,

    You have to run this code inside the WebReport.StartReport event, not in the button_click:

    Dim dt As New DataTable
    dt = MajorDBMajor_DataTable("11", "major", "CSIE_096_005")
    WebReport1.Report.RegisterData(dt, "dt")

    Hi,AlexTZ..

    thank you for your help, [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> My issue has been resolved . but... there is new issue....lOl... the report just show one data... my datatable rows count=4 ,so the report should show 4 multiple data... the gridview and WebReport datasource is the same datatable. report text1.text=[dt.idno] how can I fix this issue? thank you.[/img]


    I'm getting the same isue... What am i doing wrong?
    Greetings, Gerjan
  • edited 6:30PM
    Hello,

    Probably your data band is not connected to any datasource. In this case it will display one row only. Doubleclick the databand and select a datasource for it.
  • edited 6:30PM
    AlexTZ wrote: »
    Hello,

    Probably your data band is not connected to any datasource. In this case it will display one row only. Doubleclick the databand and select a datasource for it.

    I already found the answer on the forum and it did work.

    Thank you Alex
  • edited 6:30PM
    I'm getting the same isue... What am i d ,only one rows thanks..

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.