Hello Telerik Team,
I'm find it difficult to pass a report parameter value from the client side and access the particular value within the Telerik report class.
cshtml code.
@{
TypeReportSource typeReportSource = new TypeReportSource() { TypeName = typeof(TestTelerik.Website.Reports.MySales).AssemblyQualifiedName };
typeReportSource.Parameters.Add("param", "A");
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl(Url.Content("~/api/reports/"))
.TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate-9.1.15.624.html"))
.ReportSource(typeReportSource)
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
.Deferred()
I have defined a method to trigger NeedDataBind event which is as follows.
private void ProductReport_NeedDataSource(object sender, EventArgs e)
{
var myParam = this.ReportParameters["param"].Value.ToString();
}
Also i have defined report parameter as follows. However, this.ReportParameters["param"].Value is always null. Could I know what am I doing wrong in my code.
reportParameter1.Name = "param";
this.ReportParameters.Add(reportParameter1);
We have a report with a Multivalue parameter. We use the WebForms ReportViewer control to allow the user to make a selection before running the report. We have noticed that, when certain combinations of selections are made, if the user selects out of the combobox and selects back into it, some of their selections are lost. It is always the same selections that get lost.
I have checked the datasource that the multivalue parameter is bound to and there are no duplicate IDs in the list of values.
Are there any known issues with the ReportViewer control and multivalue comboboxes that might explain why certain selections can get unselected?
Hi,
I need to display 2 subreports side by side on a report.
The first one contain a table object with a variable columns number base on the data it need to show. That part is working ok.
The second subreport is fixed in width and must be place right of the first with a 1 cm space between them.
The problem I'm having, is that we need to center horizontally that subreports block.
I can't find a way to get the subreport1 width after it is rendered so I have the processed width not the design time one.
How can I do this? With code? And if so, any example of code?
Thank you.
Hi,
I have abandoned tables due to grouping issues and am now using textboxes and report groups. In a group header, I have 5 texboxes which all have CanGrow set to True.
The problem is that when one text box grows in height, the others stay the same size. I would like all textboxes to be the same height after the report renders. So if one text box has to grow, the others should grow to that same size.
I tried to use anchoring, but I have textboxes above and below so they end up overlapping if I anchor them.
Is there anyway to get all texboxes in a group to grow in height dynamically depending on the size of the largest?
Thanks,
Phillip
I am trying to bind a TextBox to an a dynamically named column using expressions.
var textBoxHistorical =
new
TextBox
{
Name =
"myTextBox"
,
Value =
"= Fields.["
+ dynamicColumnName+
"_Average])"
,
Size =
new
SizeU(Unit.Pixel(100), Unit.Pixel(20)),
Location =
new
PointU(Unit.Pixel(0), Unit.Pixel(0))
};
The column name can have ugly characters like \/*[]:?|-+@#$$^&()_,.!3. When I try to bind to Fields.[\/*[]:?|-+@#$$^&()_,.!3_Average], I get an error like
Cannot interpret token '\' at position 13.
I tried escaping the slash with another slash, and got the same error. How do I escape characters in an expression? Which characters do I need to escape? I figure I need to escape the closing bracket also, but trial by error is probably not the best way to solve the problem.
Hi,
when I print a report (created with C# WPF) with a PDF-Printer like "7-PDF Printer", I will get an image of the report in the pdf file.
Is there any way to get text and images in the pdf?
Thx