Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion� and appreciate your understanding.

Report .rdl is not getting the parameters passed by the codebehind

using Syncfusion.Windows.Reports;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Windows;
using LorikeetDataLib;

namespace LorikeetWPF
{
    /// <summary>
    /// Interaction logic for AddressReportWindow.xaml
    /// </summary>
    public partial class AddressReportWindow : Window
    {
        private LorikeetAppEntities context = new LorikeetAppEntities();

        public string birthday1;
        public string birthday2;

        public AddressReportWindow()
        {
            InitializeComponent();
        }

        private void addressViewer_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                context.Members.Load();

                var address = from a in context.Members.Local
                              where a.ReceiveNewsletter == true
                              orderby a.Surname descending
                              select a;

                addressViewer.ReportPath = System.IO.Directory.GetCurrentDirectory() + "\\Reports\\MailingLabels.rdl";
                addressViewer.DataSources.Clear();
                addressViewer.DataSources.Add(new ReportDataSource { Name = "DataSetMemberAddress", Value = address });
                addressViewer.RefreshReport();
            }
            catch (Exception ex)
            {
                MessageBox.Show(MiscStuff.GetAllMessages(ex));
            }
        }


        private void addressViewer_ReportLoaded(object sender, EventArgs e)
        {
            List<ReportParameter> parameters = new List<ReportParameter>();
            ReportParameter parameter = new ReportParameter();
            parameter.Name = "ReportParameterBirthday1";
            parameter.Values.Add(birthday1);
            //Add parameter
            parameters.Add(parameter);
            ReportParameter parameter2 = new ReportParameter();
            parameter2.Name = "ReportParameterBirthday2";
            parameter2.Values.Add(birthday2);
            //Add parameter
            parameters.Add(parameter2);

            addressViewer.SetParameters(parameters);
        }
    }
}


For some reason this worked in earlier versions of Syncfusion but now it is broken. When i try and view the report it says it hasnt got the parameters.
Please help :)



Attachment: MailingLabels_df984122.zip

1 Reply

VS Vinoth Srinivasan Syncfusion Team November 1, 2017 12:27 PM UTC

Hi Byron, 

Thanks for your interest in Syncfusion Components. 

We were able to send the parameter to the RDL report from code behind and we have prepared a sample based on this and it can be downloaded from the below location. 


If you still face any issue then could you please modify the sample to reproduce the problem at our end. 

Regards, 
Vinoth S. 


Loader.
Up arrow icon