Pass data set to report not working

Stimulsoft Reports.WEB discussion
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Pass data set to report not working

Post by d3graph »

Hi dear fellows

i am trying to load a report in an web application
i have setup 2 Data Sources in report designer Emp, EA
and pass new data set to report at run time report loaded but the
data is not refreshing

please look at the following code

Code: Select all

           
string sql = "Select ID As F_EmployeeMaster,EmpName,FatherName,Department,Designation,ShiftInTime,F_CompanyMaster,ShiftOutTime From vEmployeeDetails Where F_CompanyMaster = " + Options.F_CompanyMaster + " AND ID = " + GetSqlParameterValueByName("@F_EmployeeMaster", param);
            DataSet Emp = SqlClientUtility.ExecuteDataSet("eVartikaConnectionString", CommandType.Text, sql, null);


            SqlParameter[] rparams = new SqlParameter[]
            {
                new SqlParameter("@F_CompanyMaster", Options.F_CompanyMaster),
                new SqlParameter("@F_EmployeeMaster", GetSqlParameterValueByName("@F_EmployeeMaster",param )),
                new SqlParameter("@F_DepartmentMaster", GetSqlParameterValueByName("@F_DepartmentMaster",param)),
                new SqlParameter("@FromDate", GetSqlParameterValueByName("@FromDate",param)),
                new SqlParameter("@ToDate", GetSqlParameterValueByName("@ToDate",param)),
                new SqlParameter("@UserId", Options.UserId)
            };

            DataSet EA = SqlClientUtility.ExecuteDataSet("eVartikaConnectionString", CommandType.StoredProcedure, "EmployeeWiseAttendanceReport", rparams);
            string appDirectory = HttpContext.Current.Server.MapPath(string.Empty);
            // Load report
            StiReport report = new StiReport();
            report.Load(appDirectory + "\\Attendance\\EmployeeWiseAttendance.mrt");

            report.RegData(Emp);

            report.RegData(EA);

            report.Compile();

            // View report
            
            StiWebViewer1.Report = report;
      
can you please guide me what i am doing wrong

thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Pass data set to report not working

Post by Alex K. »

Hello,

Can you please send us a sample project with test data which reproduce the issue for analysis.

Thank you.
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Re: Pass data set to report not working

Post by d3graph »

Dear Aleksey

thanks for your reply.
I can upload the report file. as you can see that i have created 2 data sources in report file
and register them with exact names at run-time already populated data-sets

Regards
Attachments
EmployeeWiseAttendance.mrt
(47.36 KiB) Downloaded 159 times
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Re: Pass data set to report not working

Post by d3graph »

Dear Aleksey ,

Please Reply
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Pass data set to report not working

Post by Alex K. »

Hello,

It is difficult to say something without test data for your report.
Can you please send us a simple project with test data.

Thank you.
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Re: Pass data set to report not working

Post by d3graph »

ok let me prepare a test project
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Pass data set to report not working

Post by Andrew »

Hello,

Ok! Waiting for the project.
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Re: Pass data set to report not working

Post by d3graph »

here i have attached the project and bak file
Attachments
WebApplication3.rar
(462.56 KiB) Downloaded 162 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Pass data set to report not working

Post by Alex K. »

Hello,

Thank you for the sent files.
Can you please check the .bak file. We couldn't restore database from your file.
Thank you.
d3graph
Posts: 13
Joined: Mon Jan 06, 2014 6:27 am

Re: Pass data set to report not working

Post by d3graph »

it is backup of sql server 2008 r2 10.50
let me attach the sql export
Attachments
script.zip
(17.74 KiB) Downloaded 158 times
Post Reply