Hello,
I'm using ASP.NET web form and VB Language to create report generating page and getting data from created stored procedure that was wrote in MSSQL with 3 input variables. That data were returned as "datatable" datatype in program. I try to bind datatable to report with these codes:
' ------------------------------------------ Data that reurned in datatable format from --------------------------------------------------
Dim ReportInfo As DataTable = ContractReport.GetDetialReport(ContractId, Session("sdate"), Session("edate"))
' -------------------------------------------------------------------------------------------------------------------------------------------------
Dim Report As StiReport = New StiReport()
Report.Load(Server.MapPath("~/reports/Reports.mrt"))
Report.RegData("ReportInfo", ReportInfo)
Report.Render(False)
Dim mySettings = New StiExcelExportSettings()
mySettings.ExportDataOnly = True
mySettings.UseOnePageHeaderAndFooter = True
StiReportResponse.ResponseAsXls(Report, mySettings, True)
I create report template with name of "Reports.mrt" that have no connected to database.With all of attemptions, the generated report was empty. Could you please show me how to do it with sample.
Thanks in advance.
Loading DataTable to Excel Format
Re: Loading DataTable to Excel Format
Hello.
Do you have such Data Source in your report?
What data connection do you use in the report?
Could you send us your report template?
Thank you.
Do you have such Data Source in your report?
What data connection do you use in the report?
Could you send us your report template?
Thank you.
Re: Loading DataTable to Excel Format
Yes, I retrieve that Data Source from Data Access defined layer and pass information of database to method of logic layer. I also connect designed report in stimulsoft to database and select specified stored procedure.In below picture I design that report and save in one of folder in my project.
Thank you very much.
Thank you very much.
- Attachments
-
- Stimulsoft-DesignedReport.png (65.32 KiB) Viewed 2067 times
Re: Loading DataTable to Excel Format
Hello,
I Find solution. I Add below code:
Report.Load(Server.MapPath("~/reports/Reports.mrt"))
Report.Compile()
Report("@FDate") = Convert.ToString(Session("sdate"))
Report("@TDate") = Convert.ToString(Session("edate"))
Report("@ContractID") = Convert.ToInt32(ContractId)
Report.Render()
and problem solved.
Thanks again.
I Find solution. I Add below code:
Report.Load(Server.MapPath("~/reports/Reports.mrt"))
Report.Compile()
Report("@FDate") = Convert.ToString(Session("sdate"))
Report("@TDate") = Convert.ToString(Session("edate"))
Report("@ContractID") = Convert.ToInt32(ContractId)
Report.Render()
and problem solved.
Thanks again.
Re: Loading DataTable to Excel Format
Hello,
Ok.
Please let us know if you need any additional help.
Thank you.
Ok.
Please let us know if you need any additional help.
Thank you.