Telerik Forums
Reporting Forum
2 answers
108 views

 I need to print a voucher document, one page/ document per person.

 I have defined a data source to retrieve a single record (Select FullName, StudentId from Table where Student ID = '1234567')  but when I try to set the value of a text box in 'Edit Expression' there are no Fields in the Field list. When I key in =Fields.FullName, nothing appears in the preview. When I key in [=Fields.FullName] then I see [=Fields.FullName] in the Preview.

 

What am I missing?

 

Thank you

Michael
Top achievements
Rank 1
 answered on 10 Mar 2020
3 answers
120 views

Hi, 
I have the following problem. I have a report that contains a few graphs with X axis as DateTime and a subreport which is also a graph reused in many reports. It is not acceptable to me to set label, major and minor points units and ranges in designer since in one case I can have 7 days process, and in other case 5 minutes process. According to this I need to calculate total time and decide if I will set label, major and minor points in seconds, minutes or hours, and also to calculate range so that I have approximately 10 major points on the graphs X axes. To achieve this i am modifying values set in designer programmatically at runtime. I tried the following approaches, neither is working:

1. I used ItemDataBound event on report and subreport hoping that in the time it fires I will have report data source filled, so that I can use data source to get collection of data to calculate. This was not the case. Data source was still null at the time of firing. 

2.I tried to calculate explicitly by calling the public method in a report that will do the calculation. This was a successful approach for the graphs in the report since I call this method from outside the report after assigning data source, but still can't find a way to call public method in the subreport from the main report after the subreport bound the data source.

I would appreciate help.

Todor
Telerik team
 answered on 09 Mar 2020
1 answer
10.0K+ views
i know that it has been said that the IIf function evaluates both the true and false expression and reports an error if either causes an error and this is done by design. I'm just confused how, without a user function, to do certain, everyday things. For example.. In case of this simple report:

item.... sold... avg price.. in stock..  avg days
A112       5        112.00             5               22
A113       0            !DIV             1               12
A114       1        114.00             0             !DIV

in a normal situation you would get the avg price by using the expression =iif(Fields.sold>0,Fields.totalprice/Fields.sold,0) and avg days in stock =iif(Fields.instock>0,Fields.totaldaysinstock/Fields.instock,0)
but in telerik reports the expression will cause a divide by 0 error because both expressions in the iif() are evaluated. These are simplified examples and I understand there is an avg() function, but there is more processing going on that voids it's use.

Todor
Telerik team
 answered on 06 Mar 2020
1 answer
320 views

I used to Telerik reporing for data show. It is work order. but after update 2020 R1. I can not replace the connection string. please help.

my controller:

[Route("api/reports")]
    public class ReportsController : ReportsControllerBase
    {
        string reportsPath = string.Empty;

        public ReportsController(IHostingEnvironment environment)
        {
            this.reportsPath = Path.Combine(environment.WebRootPath, "UserUpload\\Reports");
            this.ReportServiceConfiguration = new ReportServiceConfiguration
            {
                HostAppId = "Html5DemoApp",
                Storage = new FileStorage(),
                ReportResolver = new ReportTypeResolver()
                                    .AddFallbackResolver(new ReportFileResolver(this.reportsPath)),
            };
        }


        [HttpGet("reportlist")]
        public IEnumerable<string> GetReports()
        {
            return Directory
                .GetFiles(this.reportsPath)
                .Select(path =>
                    Path.GetFileName(path));
        }
    }

 

viewer code:

<script>
    function ReportRendering(e,args) {
        var info = args.deviceInfo;
        //info.set("FontEmbedding", "Full");
    }
   
    function OnLoad()
    {
        var win = window.parent.GetWindow("WdIframe");
        var report = win.reportName;
        var parameters = win.reportParam;
        var printMode = /(chrome)/.test(navigator.userAgent.toLowerCase())
            ? telerikReportViewer.PrintModes.FORCE_PDF_PLUGIN
            : telerikReportViewer.PrintModes.FORCE_PDF_FILE;


        $("#reportViewer")
            .telerik_ReportViewer({
                serviceUrl: "../api/reports/",
                reportSource: {
                    report: report,
                    parameters: parameters,
                },
                viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                scale: 1.0,
                enableAccessibility: false,
                sendEmail: { enabled: false }
            });


        //$("#reportViewer").telerik_ReportViewer({
        //    serviceUrl: "../Api/reports/",
        //        reportSource: {
        //            //report: "Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary",
        //            report: report,
        //            parameters: parameters,
        //    },
        //    renderingBegin:ReportRendering,
        //    viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
        //    scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
        //    scale: 1.0
        //});
        if (win.mode == "Print") {
            var reportViewer = $("#reportViewer").data("telerik_ReportViewer");
            reportViewer.bind(telerikReportViewer.Events.PAGE_READY, function (e) {
                reportViewer.commands.print.exec();
            });
        }
    }
    $(document).ready(OnLoad());
</script>

 

Katia
Telerik team
 answered on 06 Mar 2020
1 answer
229 views

I was creating a report in Oracle and running an SP when suddenly my computer started to slowdown, upon checking I discovered that the Telerik ReportDesigner R1 2020 is consuming 4,920.4 of memory with 1.9MB/s in Disk. Because of this outcome and due to my computer slowdown, I hard re-boot my computer. After opening my PC and logging in, I opened the ReportDesigner but it no longer opens up. It always gives up an error message "Fatal error in workbench. Now closing... An error has occured while loading the ReportDesigner's Workbench".

Here is an attached file for the crashed Telerik ReportDsigner,

I need to get the app started badly to finish my report and to give assessment on Telerik Reproting to my bosses.

Thanks in advance!

Neli
Telerik team
 answered on 05 Mar 2020
1 answer
709 views
Is it possible to have multiple textboxes in a single table cell? The reason i want that is to use different fonts/styles etc. HtmlTextBox does not help because we also want this to work in Excel.
Katia
Telerik team
 answered on 05 Mar 2020
1 answer
507 views

Hi,

I want to make a report by using report viewer on Winforms(C#). 

Report was designed on Visual studio 2019. 

When I add and set a sqlDataSource on Report Designer.  it is shown correctly.

 

I create a report on report viewer on Winforms(C#) by dynamic data with SQL query.

How can I set sqlDataSource ?

 

Here is my code.

 

private void reportViewer1_Load(object sender, EventArgs e)
        {
            TypeReportSource typeReportSouce = new TypeReportSource();
            typeReportSouce.TypeName = "SalesManager.Products.BarcodePrintReport, SalesManager, Version=0.9.24.1, Culture=neutral, PublicKeyToken=null";
            typeReportSouce.Parameters.Add(new Telerik.Reporting.Parameter("Barcode", "O43659"));

            SqlDataSource sqlDataSource = new SqlDataSource();
            sqlDataSource.ProviderName = "MySql.Data.MySqlClient";
            sqlDataSource.ConnectionString = "Server=********;Port=****;Database=****;Uid=****;Pwd=*****;CharSet=utf8;Convert Zero Datetime=True";
            sqlDataSource.SelectCommand = "SELECT barcode,name FROM product_list WHERE code = 'TT003' OR  code = 'TT002'";
            sqlDataSource.CommandTimeout = 0;

            this.reportViewer.ReportSource = typeReportSouce;
            this.reportViewer.RefreshReport();
        }

박문석
Top achievements
Rank 1
 answered on 05 Mar 2020
0 answers
94 views

Im trying to make a doble colum report, and i gotit  but a the and of report i want to end in a complente center table, but i can not get it cuz the report is in double column.

 

What can I Do for resolve that problem. 

Ezequiel
Top achievements
Rank 1
 asked on 04 Mar 2020
1 answer
48 views

Hi,

        I have downloaded Telerik_Reporting_Q1_2016_SP1_manual.chm, however I can only see the content tables, I cannot see content on the right hand side of help windows. I am using windows 10.

 

Neli
Telerik team
 answered on 04 Mar 2020
2 answers
768 views

Downloaded and installed Telerik Report Designer to do some assessment. I am trying to connect to Oracle database for the report I've been working with. But when I click "Test Connection", I encountered this issue.

I wan't to know what does this mean, and how to resolve this issue.

PS: Currently using the following:

Processor: Intel Core i7-6500U
OS: Win 10 Pro ver.1909 OS Build: 18363.657
64bit, x64-based processor 

Any help would be highly appreciated. Thanks in advance.

frederick
Top achievements
Rank 1
 answered on 04 Mar 2020
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?