none
Problem in SetParameter in local report with C++ RRS feed

  • Question

  • Hi,

    I am using VS 2005 c++ ReportViewer to generate a dynamic report with a date filter.

    The following is the code contained in the form.h:

    public: void SetReportParameters()
    {
    ReportParameter^ DatePara = gcnew ReportParameter("ShowDate",this->datepick->Value.ToString());

    this->reportViewer1->LocalReport->SetParameters( gcnew array<ReportParameter^>{DatePara});

    }

    The last statement above leads to Error C2664, which complains that .. cannot convert parameter1 from 'cli::array<Tpe>^' to 'System::Collections::Generic::IEnumerable<T>^'...

    Is this related to some bug in my version of Visual Studio 2005? This seems related to Feedback
    C++/CLI incorrectly requires safe_cast to assign CLI array to IEnumerable<T>, opened in 11/05/2006

    Is there any walkaround of the C2664 problem described above in VS2005?

    Or is the problem gone only in VS2008?

    Sunday, March 9, 2008 2:34 AM