Telerik Forums
Reporting Forum
1 answer
381 views

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

Neli
Telerik team
 answered on 26 Nov 2019
0 answers
123 views

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

Rudá Cunha
Top achievements
Rank 2
 asked on 25 Nov 2019
3 answers
172 views

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

Sami
Top achievements
Rank 1
 answered on 25 Nov 2019
1 answer
302 views
Can't display UTF-8 encoding character in Report.
Thanh
Top achievements
Rank 1
 answered on 24 Nov 2019
2 answers
1.9K+ views

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

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 23 Nov 2019
1 answer
805 views

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?

Neli
Telerik team
 answered on 22 Nov 2019
1 answer
851 views

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

 

Andrew
Top achievements
Rank 1
Iron
 answered on 22 Nov 2019
1 answer
716 views

 I have function and procedure in database PostgreSqL but can't create connection string for PostgreSQL. 

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 19 Nov 2019
9 answers
591 views

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

Darrin
Top achievements
Rank 1
 answered on 17 Nov 2019
1 answer
198 views

I upgraded to to latest software version and now I can't get a Telerik Report to render to save my life.  The page is very simple.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ReportViewerForm1.aspx.vb" Inherits="trvTest._ReportViewerForm1" %>
 
<%@ Register TagPrefix="telerik" Assembly="Telerik.ReportViewer.Html5.WebForms" Namespace="Telerik.ReportViewer.Html5.WebForms" %>
 
<!DOCTYPE html>
<head runat="server">
    <title>Telerik HTML5 Web Forms Report Viewer Form</title>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
 
    <style>
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 5px;
            bottom: 5px;
            overflow: hidden;
            font-family: Verdana, Arial;
        }
    </style>
 
</head>
<body>
    <form runat="server">
        <telerik:ReportViewer
            ID="reportViewer1" ServiceUrl="http://localhost/TReportServer/api/reports"
            Width="1300px"
            Height="900px"
            runat="server">
            <ReportSource IdentifierType="UriReportSource" Identifier="POSInvoice.trdp">
            </ReportSource>
            <%-- If set to true shows the Send Mail Message toolbar button --%>
            <SendEmail Enabled = "false" />
        </telerik:ReportViewer>
    </form>
</body>
</html>

 

When I run it.  The page looks like the attached screen print.  It has numerous java errors most of which seem to have something to do with Kendo and as far as I know I'm not even using Kendo.  

Nasko
Telerik team
 answered on 15 Nov 2019
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?