It worked fine in the previous version.
ObjectDataSource DOES pass parameters, but a stored proc will not work.
6 Answers, 1 is accepted
We were not able to reproduce the problem with version 6.2.12.1123. Please give us some additional information on your scenario.
- What version of Telerik Reporting are you using?
- Does the SqlDataSource behave as expected in other viewers?
- How do you pass the parameters to the SqlDataSource (with Report Parameters or not)?
Additionally if it is possible to isolate the problem into a small sample project, you can open a support thread and attach it there along with the data-base.
Elian
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
The control seems to think this is the latest version. Where do I get 6.2.12.1123?
The Control Panel would only show official versions, while my colleague has tested with the latest internal build. You have to log-in to your client account and there you would be able to find and download internal builds.
Anyway, we released Q3 SP1 2012 release yesterday, and we urge you to download it and upgrade. If the issue persists with it, try to isolate the problem into a small sample project which you can attach in an official support ticket.
All the best,
Steve
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
I upgraded my telerik reporting to Q3 2012.
I am using telerik reporting for silverlight.
Unfortunately report parameters are passed with null values now.
Here are the code:
Silverlight:
private void reportViewer_RenderBegin(object sender, RenderBeginEventArgs args) {Report:
args.ParameterValues["ProjectID"] = (cbProjects.SelectedItem as Project).ProjectID; }
Constructor
InitializeComponent(); ReportParameters.Add("ProjectID", ReportParameterType.Integer, null);
private void table1_NeedDataSource(object sender, EventArgs e) {For some reason parameterCollection["ProjectID"].Value returns null.
var parameterCollection = ReportParameters; var dataSet = ProjectHoursBLL.GetWorkedHoursByProjectID(Convert.ToInt32(parameterCollection["ProjectID"].Value.ToString()));
(sender as Telerik.Reporting.Processing.Table).DataSource = dataSet; }
I checked all dll references and they are all pointing to the Q3 2012 version.
Reports that do not require parameters are working.
Every report that require parameter is not working (parameter value is passed as null).
Please help.
Regards
Igor
The recommended approach to access the report parameters processing values in events is shown in the following code snippet:
private
void
table1_NeedDataSource(
object
sender, EventArgs e)
{
var table= (sender
as
Telerik.Reporting.Processing.Table);
var dataSet = ProjectHoursBLL.GetWorkedHoursByProjectID(Convert.ToInt32(table.Parameters[
"ProjectID"
].Value.ToString()));
table.DataSource = dataSet;
}
You may find useful the Using Report Parameters programmatically help article.
Kind regards,
Peter
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
string test = this.Report.ReportParameters[0].Value.ToString();
As a result the NeedDataSource event also returns "Object reference not set to an instance of an object. We need the new verison because it corrects the issue of crashing the program when we print the report.
Any ideas?
Bobn
Update - This worked.
Placed in the ItemDataBinding event.
Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender;
var obj = rpt.Parameters;
Classes.Global.GlobalBillAssmnt= obj[
"ID"
].Value.ToString();