Telerik Forums
Reporting Forum
1 answer
160 views

Hello,

I need to set scale unit and/or step properties based on expressions for datetime scale. The reason for this is because my charts' time axis (x-axis) vary based on report input parameters (from date and to date).

Moreover, axis labels and grid lines should be able to dynamically reflect a timespan of an hour as well as a timespan of several months. 

Doing this programmatically is currently not an option. Are there any ways to achieve the above in Telerik Report Designer?

 

 

Nasko
Telerik team
 answered on 30 Oct 2015
1 answer
246 views

Hi,

 

I want to hide header and footer of main report, in subreport.

Ignore header and footer of main report, in some of sub reports.

Nasko
Telerik team
 answered on 30 Oct 2015
3 answers
390 views

We are using Telerik Reporting 2015 Q2 using HTML5 MVC Viewer and REST Web API services.

Everything working fine and the report rendered correctly and exports fine. Event the print functionality is working great.

But when clicking the print preview button for single page report, it fails. From browser console we see that the request receives 400 response.

The same print preview works when the rendered reports has 2 pages or more.

We are using SQL Server Database for caching.

Are we missing something?

Stef
Telerik team
 answered on 30 Oct 2015
1 answer
175 views

I'm trying to use two sqlDataSources on a single report.

 So farI have this piece of code where the Datasource is binded to the first sqlDataSource.

 

01.this.sqlDataSource1.ConnectionString = this.SqlConnectionString;
02.this.sqlDataSource1.CommandTimeout = 600;
03.this.sqlDataSource1.Parameters.Clear();
04.this.sqlDataSource1.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {
05.                new Telerik.Reporting.SqlDataSourceParameter(StandardParams.varKey, System.Data.DbType.Int32, _varKey),
06.                new Telerik.Reporting.SqlDataSourceParameter(StandardParams.IncludeZeroBalance, System.Data.DbType.Boolean, false)
07.            });
08.this.sqlDataSource3.ConnectionString = this.SqlConnectionString;
09.this.sqlDataSource3.CommandTimeout = 600;
10.this.sqlDataSource3.Parameters.Clear();
11.this.sqlDataSource3.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {
12.                new Telerik.Reporting.SqlDataSourceParameter(StandardParams.varKey, System.Data.DbType.Int32, _varKey)
13.            });
14.this.DataSource = sqlDataSource1;

 

I want to know if there is a way in order to tell the report that whenever I set the value of an htmlTextBox I can use the sqlDataSource other than the one set on this.DataSource.

 

Thanks.

Stef
Telerik team
 answered on 30 Oct 2015
1 answer
111 views
getting this error in the end of installation process. Error screen attached.
I have run package as administrator on local computer (WIndows 10).

what's wrong? 

thanks

 
 

Stef
Telerik team
 answered on 30 Oct 2015
1 answer
861 views

Hi,

 We are trying to pass the data source query for the Telerik report as a parameter, at present we have option to build data source query during report creation in stand alone designer and the query is hardcoded inside the report(trdx file) when viewed from report designer or dot net application.

 

But we want to build the source query filters at run time in dot net application and pass them to the Telerik reports. I had raised a support ticket for this but haven't got an update from them, please share if you have some pointers to achieve this.

Thanks,

Daniel

Stef
Telerik team
 answered on 29 Oct 2015
1 answer
133 views

When the report viewer (version 9.1.15.731) initially loads the first two group lines show one font and the next two group lines show a different font.

 When we switch to print preview, it corrects itself for the entirety of the session.

The report also prints as expected (with the same font throughout).

 

See the attached image which shows the initial display of the report.

 Is there any known issue that is causing this?

 

Stef
Telerik team
 answered on 29 Oct 2015
1 answer
220 views

Hi,

 

I am developing an application in MVC5. For reporting i am using telerik kit. I am facing issue that report is not binding to reportviewer.

 Code is attached and also written below. please guide me.

@using Telerik.Reporting
@using Telerik.ReportViewer.Mvc
@{
    ViewBag.Title = "Telerik MVC HTML5 Report Viewer";
}

@section styles
{
    <link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet" />

    <link href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.blueopal.min.css" rel="stylesheet" />


    <style>
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 5px;
            bottom: 5px;
            overflow: hidden;
            font-family: Verdana, Arial;
        }
    </style>

    <link href="@Url.Content("~/ReportViewer/styles/telerikReportViewer-9.1.15.731.css")" rel="stylesheet" />
}

@(Html.TelerikReporting().ReportViewer()
        // Each report viewer must have an id - it will be used by the initialization script
        // to find the element and initialize the report viewer.
        .Id("reportViewer1")
        // The URL of the service which will serve reports.
        // The URL corresponds to the name of the controller class (ReportsController).
        // For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
        .ServiceUrl(Url.Content("~/api/reports/"))
        // The URL for the report viewer template. The template can be edited -
        // new functionalities can be added and unneeded ones can be removed.
        // For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
        .TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate-9.1.15.731.html"))
        // Strongly typed ReportSource - TypeReportSource or UriReportSource.
        .ReportSource(new TypeReportSource() { TypeName = "Telerik.Reporting.Examples.CSharp.ProductCatalog, DubaiFleet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" })
        // Specifies whether the viewer is in interactive or print preview mode.
        // PrintPreview - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
        // Interactive - Displays the report in its original width and height with no paging. Additionally interactivity is enabled.
        .ViewMode(ViewMode.Interactive)
        // Sets the scale mode of the viewer.
        // Three modes exist currently:
        // FitPage - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
        // FitPageWidth - The report will be zoomed in or out so that the width of the screen and the width of the report match.
        // Specific - Uses the scale to zoom in and out the report.
        .ScaleMode(ScaleMode.Specific)
        // Zoom in and out the report using the scale
        // 1.0 is equal to 100%, i.e. the original size of the report
        .Scale(1.0)
        // Sets whether the viewer’s client session to be persisted between the page’s refreshes(ex. postback).
        // The session is stored in the browser’s sessionStorage and is available for the duration of the page session.
        .PersistSession(false)
        // Sets the print mode of the viewer.
        .PrintMode(PrintMode.AutoSelect)
        // Defers the script initialization statement. Check the scripts section below -
        // each deferred script will be rendered at the place of TelerikReporting().DeferredScripts().
        .Deferred()
        .ClientEvents(
                events => events
                    .RenderingBegin("onRenderingBegin")
                    .RenderingEnd("onRenderingEnd")
                    .PrintBegin("onPrintBegin")
                    .PrintEnd("onPrintEnd")
                    .ExportBegin("onExportBegin")
                    .ExportEnd("onExportBegin")
                    .UpdateUi("onUpdateUi")
                    .PageReady("onPageReady")
                    .Error("onError")
                    )
        // Uncomment the code below to see the custom parameter editors in action
        //.ParameterEditors(
        //        editors => editors
        //            .SingleSelectEditor("createSingleSelectEditor")
        //            .CustomEditors(new CustomParameterEditor
        //            {
        //                MatchFunction = "customMatch",
        //                CreateEditorFunction = "createCustomEditor"
        //            })
        //)
)

@section scripts
{
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-9.1.15.731.min.js")"></script>

    <!--kendo.all.min.js can be used as well instead of kendo.web.min.js and kendo.mobile.min.js-->
    <script src="http://cdn.kendostatic.com/2013.2.918/js/kendo.web.min.js"></script>
    <!--kendo.mobile.min.js - optional, if gestures/touch support is required-->
    <script src="http://cdn.kendostatic.com/2013.2.918/js/kendo.mobile.min.js"></script>


    <script>
        function onRenderingBegin() {
            console.log("rendering begin!");
        }
        function onRenderingEnd() {
            console.log("rendering end!");
        }
        function onPrintBegin() {
            console.log("print begin!");
        }
        function onPrintEnd() {
            console.log("print end!");
        }
        function onExportBegin() {
            console.log("export begin!");
        }
        function onExportEnd() {
            console.log("export end!");
        }
        function onUpdateUi() {
            console.log("update ui!");
        }
        function onError() {
            console.log("error!");
        }
        function onPageReady() {
            console.log("page ready!");
        }

        function createSingleSelectEditor(placeholder, options) {
            var dropDownElement = $(placeholder).html('<div></div>');
            var parameter,
                  valueChangedCallback = options.parameterChanged,
                  dropDownList;

            function onChange() {
                var val = dropDownList.value();
                valueChangedCallback(parameter, val);
            }

            return {
                beginEdit: function (param) {

                    parameter = param;

                    $(dropDownElement).kendoDropDownList({
                        dataTextField: "name",
                        dataValueField: "value",
                        value: parameter.value,
                        dataSource: parameter.availableValues,
                        change: onChange
                    });

                    dropDownList = $(dropDownElement).data("kendoDropDownList");
                }
            };
        }

        function customMatch(parameter) {
            return Boolean(parameter.availableValues)
                && !parameter.multivalue
                && parameter.type === telerikReportViewer.ParameterTypes.BOOLEAN;
        }

        function createCustomEditor(placeholder, options) {
            var dropDownElement = $(placeholder).html('<div></div>');
            var parameter,
                  valueChangedCallback = options.parameterChanged,
                  dropDownList;

            function onChange() {
                var val = dropDownList.value();
                valueChangedCallback(parameter, val);
            }

            return {
                beginEdit: function (param) {

                    parameter = param;

                    $(dropDownElement).kendoDropDownList({
                        dataTextField: "name",
                        dataValueField: "value",
                        value: parameter.value,
                        dataSource: parameter.availableValues,
                        change: onChange
                    });

                    dropDownList = $(dropDownElement).data("kendoDropDownList");
                }
            };
        }
    </script>

    @(

        // All deferred initialization statements will be rendered here
        Html.TelerikReporting().DeferredScripts()
    )
}

I am using reportviewerview1.cshtml as partail view in someother page. but it showing report viewer.

kindly guide me.

 

Regards,

 

Faisal

 

 

Nasko
Telerik team
 answered on 29 Oct 2015
2 answers
764 views

Hi,

I'm using Telerik Reporting 9.015.324 (VS 2015, Windows 10 x64).  I have a PictureBox in the Detail section of my report.  I have its Value property set to a string field in my data source - "ImagePath" - which is returning file paths.  The images are different sizes and proportions and I need them all to fit within the margins of the report.  Additionally, there is a TextBox in the Detail section with text content returned by the data source - "Content".  I'm trying to use a User Function to enforce a maximum Height and/or Width on the PictureBox based on the actual Height/Width of the image file.

This is my height function:

public static int GetPictureBoxHeightFromImagePath(string imagePath)
{
    Image img = Image.FromFile(imagePath);
    return img.Height;
}

That user function is bound to the Height property of the PictureBox.

When I preview my report I get an "Out of memory" exception almost immediately.

I'm curious as to why I'm getting this exception, but my main objective is to get my report images to fit within the report.

I'm open to other approaches.

Thanks much.

 
 
Aaron
Top achievements
Rank 1
 answered on 28 Oct 2015
1 answer
376 views
I want to convert a string to an int using the CInt function, but it can only can fields to int32 and if my fields is bigger than that, I get this error:
value is either too large or too small for an int32
How can I use int64 conversion in Telerik Reporting?
Nasko
Telerik team
 answered on 28 Oct 2015
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?