I have an issue on my Telerik charts where the data label will be inside of the column if the column reaches the edge of the chart area, as attached.
Is there anyway to force the chart to not reach the edge so this won't occur? I'm assuming it takes the largest value and uses that as the edge of the chart, how do I go about stopping this? I've made sure the DataPointLabelAlignment is set to OutsideEnd, as that would make the most logical sense.
Any help on this would be greatly appreciated - I'm sure it's something small and stupid that I'm missing!
Thanks,
I have created a line chart with a DateTime scale for the X-Axis, however it start's slightly offset from the Y-Axis. I know I can set this from the CrossAxisPosition on the X Axis scale, but it seems I can only set a pre-defined datetime value, as from the DateTimeScale.png attached, and not a dynamic one based of the datasource. Is this possible or is there a way around it?
Thanks,
I created a report with subreport in Standalone Report Designer. I want to export it to PDF programmatically. I created an example Windows Form Application which gets parameters from user with textboxes. And when user writes values to its indicated textbox and then presses export to pdf. Then my application export it to pdf. But I have something wrong there. I must get the datasource or connection from my report file in order to set it in the program. How can I do this ?
I will share my app's picture.
Here is my code :
01.
private
void
BtnExportPDF_Click(
object
sender, EventArgs e)
02.
{
03.
var reportProcessor =
new
Telerik.Reporting.Processing.ReportProcessor();
04.
05.
// set any deviceInfo settings if necessary
06.
var deviceInfo =
new
System.Collections.Hashtable();
07.
08.
09.
10.
// -2-
11.
// ***Declarative (TRDP/TRDX) report definitions***
12.
var reportSource =
new
UriReportSource();
13.
14.
// reportName is the path to the TRDP/TRDX file
15.
reportSource.Uri = @
"C:\Users\OE\Desktop\TelerikReport\Deneme.trdp"
;
16.
//var reportPackager = new ReportPackager();
17.
//using (var sourceStream = System.IO.File.OpenRead(@"C:\Users\OE\Desktop\TelerikReport\Deneme.trdp"))
18.
//{
19.
// var report = (Report)reportPackager.UnpackageDocument(sourceStream);
20.
//}
21.
//Telerik.Reporting.SqlDataSource sqlDataSource = new Telerik.Reporting.SqlDataSource();
22.
//sqlDataSource.ProviderName = "System.Data.SqlClient";
23.
//sqlDataSource.ConnectionString = "Data Source=(local)\\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True";
24.
25.
26.
// -2-
27.
28.
// -3-
29.
// ***Instance of the report definition***
30.
//var reportSource = new Telerik.Reporting.InstanceReportSource();
31.
32.
// Report1 is the class of the report. It should inherit Telerik.Reporting.Report class
33.
//reportSource.ReportDocument = new Report1();
34.
// -3-
35.
object
parameterValue = txtBasDep.Text;
36.
reportSource.Parameters.Add(
"basdepid"
, parameterValue);
37.
object
parameterValue1 = txtBitDep.Text;
38.
reportSource.Parameters.Add(
"bitdepid"
, parameterValue1);
39.
object
parameterValue2 = txtSonDogum.Text;
40.
reportSource.Parameters.Add(
"sondogumtar"
, parameterValue2);
41.
42.
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(
"PDF"
, reportSource, deviceInfo);
43.
44.
// Pass parameter value with the Report Source if necessary
45.
46.
47.
string
fileName = result.DocumentName +
"."
+ result.Extension;
48.
string
path = @
"C:\Users\OE\Desktop\TelerikReport"
;
49.
string
filePath = System.IO.Path.Combine(path, fileName);
50.
51.
using
(System.IO.FileStream fs =
new
System.IO.FileStream(filePath, System.IO.FileMode.Create))
52.
{
53.
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
54.
}
55.
56.
MessageBox.Show(
"The report has been exported!"
,
"Message"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
57.
}
58.
}
Hello,
I have an old code that works perfectly until today.
i use html5 reporting viewer to display the report.
when user click on print button - the chrome print dialog should be display, but in chrom 77 it's doesn't work.
I try debbuging the code, it seems that work and not failed but nothing happend:
function printDesktop(src) {
if (!iframe) {
iframe = document.createElement("IFRAME");
iframe.style.display = "none";
}
iframe.src = src;
document.body.appendChild(iframe);
}
Thanks,
Sari
Hi, attached you will find a simple graph with lines. But, as you can see, the value for the fisrt tear 2018 is 0.2, but ius display the point above the second year 2019 even its value is higher (0.3)
Please also want to know how to ignore 0 or null point, in the same image 2019 and posteriors year does not has values yet, so we need to ignore them (lines must ends at the last point with value)
Thanks
Alejandro
We have a .NET Core Web API project. Our TRDP and TRDX files are located in wwwroot/reports/.
At design time in the Standalone Designer, the reports preview as expected with the correct data.
That SAME report file at runtime does not request the data, the data method is not invoked.
The below method takes the report, processes it, but the data method never gets called by the report processor.
I've look at the TRDX file and the assembly name, method and parameter is in the correctly.
What could possibly cause this? The controller has access to the data source assembly and can execute the methods, but the report processor method that is in the same controller, does not invoke the data method.
Thank you in advance,
Karl
private HttpResponseMessage MakePdfResult(ReportSource report)
{
var rp = new ReportProcessor();
var pdf = rp.RenderReport("PDF", report, null);
var result = new HttpResponseMessage { Content = new ByteArrayContent(pdf.DocumentBytes) };
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf");
return result;
}
On our test server if we set Storage to default location which is in C:\Windows\TEMP folder we get unauthorized access exception, would setting Storage to "C:/Temp" cause any security issues, or are there better standard locations for storing temp files?
Telerik.Reporting.Services.ReportServiceConfiguration ReportConfiguration =
new
Telerik.Reporting.Services.ReportServiceConfiguration
{
ReportResolver =
new
ReportFileResolver(HttpContext.Current.Server.MapPath(
"~/MyReports"
))
.AddFallbackResolver(
new
ReportTypeResolver()),
Storage =
new
Telerik.Reporting.Cache.File.FileStorage()
};
Loading failed.
Is it just on my computer? Chrome/IE on Win7, WinServer 12
I'm trying to follow the info on this page: https://docs.telerik.com/reporting/programmatic-exporting-report. However it doesn't show what the TypeName should be. I've tried many variations from other examples but I always get this error when the RenderReport line tries to execute:
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type
var PDFSource =
new
TypeReportSource();
PDFSource.TypeName =
"rptVAC"
;
var ReportProcessor =
new
ReportProcessor();
PDFSource.Parameters.Add(
new
Telerik.Reporting.Parameter(
"VACId"
, vacId));
var result = ReportProcessor.RenderReport(
"PDF"
, PDFSource,
null
);