Fast Report and Stored Procedure

Hi everyone, I am trying to set fast-report data-set (Data-tables) using MSSQL Server Stored Procedure, Here is what is did:

1. I create a empty report template with data-source place holder:
2. I get necessary information for report with some code below:
// Get necessary report information 
                        DataTable TicketDetailDataTable = entities.Database.SqlQuery<PrintMixingreport1_Result>(
                            $"EXEC {reportConfig.SqlProcedureName} @CodePlant,@Plant_No,@St_Ticket",
                            new SqlParameter("CodePlant", plantCode), new SqlParameter("Plant_No", plantNo),
                            new SqlParameter("St_Ticket", ticketNo)).ToDataTable();

                        DataTable SheetDataTable = entities.Ticket.Where(x =>
                                x.CodePlant == plantCode && x.Plant_No == plantNo && x.Ticket_No == ticketNo.ToString())
                            .ToDataTable();
I using moreLinq Nuget package, I had noticed that 2 table has rows.

3. I Register dataset for this report:
DataSet ReportDataSet = new DataSet();
            foreach (var key in ReportDataSourceDictionary.Keys)
            {
                ReportDataSourceDictionary[key].TableName = key;
                ReportDataSet.Tables.Add(ReportDataSourceDictionary[key]);
            }

            report.RegisterData(ReportDataSet);

            return report;

4. To make sure I did right thing, I save current Report and open it with fast-report designer:
report.Save(Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "App_Data", "Reports",
                            "ReportTemplates", "templateDebug.frx"));

The Problems is: The table queried by stored procedure is empty (columns) but table instance still exist, What Wrong???

Hope some help, thank every one

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.