This is a migrated thread and some comments may be shown as answers.

Parameter Date

1 Answer 150 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
paul de Blaauw
Top achievements
Rank 1
paul de Blaauw asked on 13 Mar 2009, 12:56 PM
Hello,

I have a reportviewer in a Radwindow, with several reports.
Most of my reports are doing oke (have 1 parameter)
But the ones who do have more (in this case i only have more parameters with dates)
When i try to fill these i get some conversion errors. I tried to Parse them in my reports, but still get some errors.
Following is my code:

private

ArrayList list

 

{

 

get

 

{

 

if (Session["LIST_PARAMETER"] != null)

 

 

return (ArrayList)Session["LIST_PARAMETER"];

 

 

else

 

 

return new ArrayList();

 

}

}

 

private string rapport

 

{

 

get

 

{

 

if (Session["RAPPORTCODE"] != null)

 

 

return Session["RAPPORTCODE"].ToString();

 

 

else

 

 

return string.Empty;

 

}

}

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

//rapport kiezen

 

 

ShaRapportEntity rapportntt = new ShaRapportEntity(rapport);

 

 

switch (rapportntt.Rapportclassname.ToUpper())

 

{

 

case "SCORINGSFORMULIERVEULENS":

 

ReportViewer1.Report =

new ScoringsformulierVeulens();

 

 

break;

 

 

 

case "WEBTRANSACTIESOPDATUM":

 

ReportViewer1.Report =

new WebtransactiesOpDatum();

 

 

break;

 

//there are more, however not put in here to win some space

 

}

 

 

if (list != null)

 

{

ReportViewer1.Report.ReportParameters[0].Value = list;

    }

}

Thanks for help

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Mar 2009, 01:27 PM
Hello Paul,

With the new version of Telerik Reporting - Q1 2009 -  we introduced a new functionality, called Report Book, that allows you to combine two or more reports in a single document.  While developing the new feature, our primary goal was to make the reporting engine work  no matter if it should render one or more reports. This new requirement imposed the need to abstract the single Report and the aggregation of two or more reports into the new IReportDocument interface.

Starting with the 2009 Q1 version of Telerik Reporting both Windows Forms and ASP.NET Report Viewer controls operate with IReportDocument objects instead of single Report objects. Compared to the Report object the new interface exposes a limited functionality that we consider common for both Report and Report Book. This means that it is not possible to use the ReportViewer.Report property as before and this applies to both viewers.

In case you are sure that the viewer is currently showing a single report and you need to access its properties you can always cast the object returned by the ReportViewer.Report property to Telerik.Reporting.Report type:

((Telerik.Reporting.Report)this.reportViewer1.Report).<Property_Here>

or in your case:

Telerik.Reporting.Report report = this.ReportViewer1.Report;
report.ReportParameters[0].Value = list;


Kind regards,
Steve
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
paul de Blaauw
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or