Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Fast Report and Stored Procedure, Register data-set when use Fast report with dynamic type
post May 17 2019, 11:36 PM
Post #1


Group: Members
Posts: 2
Joined: 1-March 19
Member No.: 65565

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())

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;


            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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Time is now: 25th June 2019 - 02:14 PM