Need help. Textbox action (Navigate to Report (object instance)) does not work. Textbox is not clickable on html5 report viewer. It is working on web form report viewer (Same logic on creating the report.).
I'm using a custom report resolver where datasource is from a dataset and the report is from a xml file.
code snippet:
private void AssignSubreportDatasource(global::Telerik.Reporting.Report parent, DataSet ds)
{
var items = parent.Items.Find("textBox14", true); // contains NavigateToReportAction
if (items != null)
{
foreach (var item in items)
{
var sub1 = (((item as global::Telerik.Reporting.TextBox).Action
as global::Telerik.Reporting.NavigateToReportAction).ReportSource
as global::Telerik.Reporting.InstanceReportSource).ReportDocument
as global::Telerik.Reporting.Report;
var objds = sub1.DataSource as global::Telerik.Reporting.ObjectDataSource;
objds.DataSource = ds.Tables[0];
}
}
}
///////
public global::Telerik.Reporting.ReportSource Resolve(string reportId)
{
global::Telerik.Reporting.InstanceReportSource reportSource = new global::Telerik.Reporting.InstanceReportSource();
System.Data.DataSet ds = DeserializeDataset(datafile);
var report = (global::Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
AssignSubreportDatasource(report, ds); //assigns navigate to subreport datasource
AssignDataSource(report, ds); //assigns inline subreport datasourcereport.DataSource = ds;
report.DataSource = ds;
reportSource.ReportDocument = report;
foreach (var telerikParam in reportSource.ReportDocument.ReportParameters)
{
telerikParam.Value = "0";
}
return reportSource;
}
Hello,
I'm using a standalone *.trdx report with winforms application, In the designer I defined the parameters and linked the file with a storedprocedure which requires 3 parameters (KidName, DateFrom, DateTo), and I tested from the Telerik Report Designer and it works well in the datasource wizard
but I cannot pass the values from the .net application
I tried this code but I always get a message Missing or Invalid parameter value. Please input valid data for all parameters
this is the code I'm using:
uriReportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@KidName"
, KidName));
uriReportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@DateFrom"
, DateFrom));
uriReportSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"@DateTo"
, DateTo));
uriReportSource.Parameters[
"@KidName"
].Value = KidName;
uriReportSource.Parameters[
"@DateFrom"
].Value = DateFrom;
uriReportSource.Parameters[
"@DateTo"
].Value = DateTo;
reportViewer1.ReportSource = uriReportSource;
reportViewer1.RefreshReport();
Please fix my code and explain what I need to do
Hi
I have a dataset containing a location and a number as a % so from 0 - 100.
All I want to do is display the Location with this number against all other locations.
I've been playing with this or a while now, and the best I can get is the graph showing at a fixed height, which is great if there are only 2 or 3 locations, but each bar is really small if there are more, alternatively with the control sized large with only 2 locations is again looks silly as both bars take up the whole control.
All I want it to do is display consistently for n number of locations.
Can someone point me in the right direction please.
Andy
I have a report with one parameter that the user can change. However, the Preview button is disabled and I can't figure out why. I'm using the HTML report viewer with MVC.
I have other reports with same functionality where the Preview button is enabled.
Hi,
after adding following html paragraphs (1) to the HtmlTextBox value we are getting <p> tags converted to div and span (2) when report is rendered.
1) <p>first paragraph</p><p>second paragraph</p>
2) <div title="" class="htmlTextBox1 s1-" style="position:absolute;overflow:hidden;left:0px;top:309px;width:588px;height:48px;">
<div class="s2-" style="top:0px;left:3px;">
<span class="s3-">first paragraph</span>
</div>
<div class="s2-" style="top:33px;left:3px;">
<span class="s3-">second paragraph</span>
</div>
</div>
Is there a way to prevent this and keep original paragraph tags as they are? This makes incorrect height between lines and adds extra space after each text line.
Thanks
I am using Telerik_Reporting_R2_2017_SP1_11_1_17_614.
I currently have a c# List of objects that I can calculate at runtime. Each object has the following class:
public class Thing {
public DateTime XVal { get; set; }
public double YVal { get; set; }
public string Label { get; set; }
}
XVal - is values usually range over several years with 10000s points (often but not always separated at 15 minute intervals). I only know the min and max values at runtime.
YVal - values are typically between 0 and 50, but I only know this range at runtime.
Label - 6 different labels that are known at runtime - not used at the moment (but long term I would like a different plot for each one).
To start, I would like to plot an x-y scatter plot of each element of the list (ignoring Label), such that each element of the list creates a point with coordinates (Xval, Yval). I have tried to follow the graph wizard tutorial, selected scatter plot and added X and Y arrays, set the category to the XVal and left the series blank. I then create a list of Thing objects and set the DataSource property of the scatter graph to that list. However, the plot always comes back with no data (min and max of both axes are 0 and 1 respectively).
How can I create this scatter plot.
I am creating a reporting site that is an Angular app housed within MVC 5. When I try to instantiate the telerikReportViewer, it gives me the following error:
SyntaxError: Unexpected token :
at start (VM825 telerikReportViewer.js:4539)
at ZoneDelegate.invoke (zone.js:391)
at Object.onInvoke (ng_zone.ts:261)
at ZoneDelegate.invoke (zone.js:390)
at Zone.run (zone.js:141)
at zone.js:818
at ZoneDelegate.invokeTask (zone.js:424)
at Object.onInvokeTask (ng_zone.ts:253)
at ZoneDelegate.invokeTask (zone.js:423)
at Zone.runTask (zone.js:191)
On line 4539 of telerikReportViewer.js, it throws the error on the 9th index of 'scripts'. While debugging, 'scripts' was displayed as such:
(11) ["", "", "", "", "System.import('../src/main.js').catch(function (err) { console.error(err); });", "", "", "", "var params = {↵ AuthToken: $("#AuthToke… };↵↵ GlobalHeaderFooter.setup(params);", "{"appName":"Chrome","requestId":"f51b2a9f21e04898972e2e5463503faa"}", ""]
0:""
1:""
2:""
3:""
4:"System.import('../src/main.js').catch(function (err) { console.error(err); });"
5:""
6:""
7:""
8:"var params = {↵ AuthToken: $("#AuthToken").val(),↵ CurrentProjectId: $("#CurrentProjectId").val(),↵ CurrentServiceId: ($("#CurrentServiceId").val() == "") ? null : $("#CurrentServiceId").val(),↵ HelpUrl: "https://communities.bentley.com/communities/other_communities/sign-in_assistance_and_web_services/",↵ SignOutUrl: $("#SignOutUrl").val(),↵ LegalUrl: "https://dev-webportal-eus.cloudapp.net" + "/Legal"↵ };↵↵ GlobalHeaderFooter.setup(params);"
9:"{"appName":"Chrome","requestId":"f51b2a9f21e04898972e2e5463503faa"}"
10:""
length:11
I'm not sure what the problem is. It is saying that there is an unexpected colon, but line 9 seems to be normal. I believe this is a cause for my viewer to not show up on the page, but I'm not sure.
Hi,
I have to meet some requirements for a client:
1) Add different color bands in the chart to separate different levels.
2) Add the possibility to have multiline label on the axis.
See the image in attachement.
I would like to know if it is possible to achieve that with telerik reporting graph.