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")
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.
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")
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.
Comments
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
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