Hi all,
I'm using Telerik Reporting Designer. I created 2 reports (ParentReport and ChildReport).i made a navigation from ParentReport to ChildReport using action property with some parameters. i need to know how to use these parameters in the ChildReport and also use this parameters to filter a datasource in the ChildReport.
thanks,
Mohamed
I am using User Functions in Design and it is working perfectly.
But how do I work in the application?
I generate reports using ReportProcessor.
ASP.NET MVC
Hello,
I'm using Telerik.Reporting (13.2.19.1030) to programmably create a report book consisting of couple of reports. One of the reports contains toc and is set as TocReportSource and that report contains Toc section. I'm exporting the report book to pdf and docx. When exporting to docx the toc is not visible but when to pdf it is visible.
There's no mention about not supporting toc here: https://docs.telerik.com/reporting/designing-reports-considerations-word
Am I doing something wrong here?
var contentsReport = new ContentsPageReport();
contentsReport.DataSource = data;
var contentsReportSource = new InstanceReportSource();
contentsReportSource.ReportDocument = contentsReport;
reportBook.TocReportSource = contentsReportSource;
reportBook.TocPosition = ReportBookTocPosition.BeforeContent;
.NET Framework 4.7.1
DocumentFormat.OpenXml 2.9.1
Telerik.Reporting 13.2.19.1030
Br,
Sami
Hi,
I am having this error on my page when i try to display the report in the html5 report viewer
Error registering the viewer with the service.
An error has occurred.
Access to the path 'C:\windows\TEMP\Html5DemoApp\12.0.18.416\LCT\value.dat' is denied.
I have read that is because The error message "Access to the path X is denied" indicates that the Telerik Reporting REST service cannot access the configured file storage. By default, user temp folder will be used as a storage which is 'C:\Windows\TEMP' in this case.
I read this in the following article:
https://docs.telerik.com/reporting/knowledge-base/error-registering-the-viewer-with-the-service
It says that I need to assign default storage location using ReportsController.cs file where the settings of the Reporting REST service are defined.
The question is I can not find that file in my solution. How do we do that?
Regards,
Omar
I am using MVC report viewer along with asp.net mvc ui and I want to generate a report after an ajax call
here is my ajax
<script>
function generateAccountsPayableReports() {
var ms = $("#msInvoicesAPV").data("kendoMultiSelect");
var invoices = ms.dataItems();
var invoiceIds = [];
invoices.forEach(function (invoice) {
invoiceIds.push(invoice.Id);
});
$.ajax({
type: "POST",
url: "/APV/GenerateData ",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ 'invoiceIds': invoiceIds }),
success: function (result) {
if (result) {
console.log("Result: ", result);
var w = window.open();
$(w.document.body).html(result);
}
},
failure: function (result) {
console.error("result: ", result);
},
error: function (result) {
console.error("result: ", result);
}
});
}
</script>
and here is my controller action
[HttpPost]
public ActionResult GenerateReport(List<Guid> invoiceIds)
{
var apvReports = _reportsLogic.GenerateAccountPayableVouchers(invoiceIds);
string json = JsonConvert.SerializeObject(apvReports);
string reportSource = typeof(AccountsPayableVoucher).AssemblyQualifiedName + "--" + json;
return View("CustomReportViewer", (object)reportSource);
}
I tried initializing a new window and assigning the html to that window but if failed as you can see in my ajax call
var w = window.open();
$(w.document.body).html(result);
is there other way you could advise me to?
I created a report library .dll to print reports ad-hoc with no previewing, so I can use it in a rest api. This has been working fine since installation over 4months ago.
I have just updated to v 13.2.19.1030, now when a report is trying to print is get the following error..
"The data area passed to a system call is too small"
I have copied and pasted my code below..
-------------------------------------------------------------------------------
public void printPalletLabel(string palletBarcode, string courier, string printerName, short copies)
{
string reportName = _basePath + "\\Reports\\";
try
{
// CREATE A REPORT INSTANCE FROM THE REPORT FILE
switch (courier.ToUpper())
{
case "DPD":
reportName += "palletLabel_DPD.trdp";
break;
case "YODEL":
reportName += "palletLabel_Yodel.trdp";
break;
default:
reportName += "palletLabel_UKMail.trdp";
break;
}
// REMOVE URI START IS EXISTS
if (reportName.StartsWith("file:\\"))
reportName = reportName.Substring(6);
var reportInstance = UnpackageReport(reportName);
if (reportInstance != null)
{
// MODIFY CONNECTIONSTRING AND PASS PARAMETER
var ds = reportInstance.DataSource;
var sqlDataSource = (SqlDataSource)ds;
sqlDataSource.ConnectionString = _connectionString;
sqlDataSource.ProviderName = "System.Data.SqlClient";
sqlDataSource.Parameters["@palletBarcode"].Value = palletBarcode;
printReport(reportInstance, printerName, copies);
}
}
catch (Exception ex)
{
error = "reporting.printPalletLabel(): " + ex.Message;
}
}
private void printReport(Telerik.Reporting.Report report, string printerName, short copies)
{
try
{
InstanceReportSource reportSource = new InstanceReportSource
{
ReportDocument = report
};
// SET PRINTER
var printerSettings = new System.Drawing.Printing.PrinterSettings
{
PrinterName = printerName,
Copies = copies
};
// PRINT REPORT
var reportProcessor = new ReportProcessor();
reportProcessor.PrintReport(reportSource, printerSettings);
}
catch (Exception ex)
{
error = "reporting.printReport(): " + ex.Message;
}
}
private Telerik.Reporting.Report UnpackageReport(string reportName)
{
var reportPackager = new ReportPackager();
try
{
using (var sourceStream = System.IO.File.OpenRead(reportName))
{
var report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
return report;
}
}
catch (Exception ex)
{
error = "reporting.UnpackageReport(): " + ex.Message;
return null;
}
}
------------------------------------------------------------------------------------
The error occurs at the following line within printReport()
reportProcessor.PrintReport(reportSource, printerSettings);
Any ideas?
Thanks
Andy
I have function and procedure in database PostgreSqL but can't create connection string for PostgreSQL.
I have created .NET Solution which one use the three layers architecture (DAL: APM.DataAccess, BR: APM.BusinessRules, UI: APM (MVC Web Project)), also I have created a reporting based on class .cs (into APM web layer), I mean compiled report (not standalone). I have created the methods to retrieve data through different layers into my .NET solution. At the end I want to include an ObjectDataSource (because the data retrieved from different Layer needs be processing in order to complete and show in report) into my compiled report but I can't see the main namespace APM (web layer) which contains my method to retrieve data processed in order to display on the report. So when I add the ObjectDataSource into report layout, I can see the popup window where I can choose the Namespace and select the method to retrieve data, but here I can't see APM namespaces and I can't choose the right method. Do you have any idea or comments about it? I attached some images.
I am using the Telerik_Reporting_R3_2016_SP1_10_2_16_1025_DEV.msi