Telerik Forums
Reporting Forum
1 answer
103 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
198 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
668 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
334 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
4 answers
475 views

Hello,

I am trying to create a set of graphs. I don't know how many graphs I will need to present at designtime (could be anywhere from 1 to 5). I first attempted to do this by adding all of the charts to the designer with their different criterias set and then hiding the ones that I didn't need at runtime, however this left me with seemingly random blank pages at the end of my report. I tried to change the report's detail height both at runtime and designtime to no avail.

Next, I took the programmatic approach. I attempted to follow the instructions here but couldn't figure out how to make this work with a pie chart - the graph would show up but the slices of data would not. I gave up on this because I figured it would be more effective to do this at designtime.

Now I'm at the designtime approach. I put the graph in a table, and I am able to repeat the graph for every row of the table, but I don't seem to be able to change any properties of the graph based on the row that it's on (I need to change the title, filter criteria, etc). There also seems to be some overlapping issues.

What is the correct way to go about this? I have read this thread (and the corresponding help articles), but the thread just isn't detailed enough for me follow, and the help articles don't give much of an explanation either.

Ryan
Top achievements
Rank 1
 answered on 27 Oct 2015
3 answers
979 views
What are the recommended 'best practices' steps to connect the Telerik Standalone Report Designer to a Progress OpenEdge database and to persist this data connection for subsequent reuse with the standalone Report Designer tool?   Thank you!  
Stef
Telerik team
 answered on 26 Oct 2015
1 answer
351 views

I'm trying to compute the difference between two columns in a crosstab.

 The columns are generated based on a year value in the data source (spanning the last 5 years) and the field values are counts of the number of items in the data set that fall in the given year. I'm trying to add a column at the end which shows the increase/decrease in the counts between two of those columns (the first year in the 5-year period and the last year in the 5-year period). Since I don't know what the values of those years are, I need to determine those at runtime. (See ASCII example below)

Is there an easy way to do this? I've created a report parameter based on a stored procedure which gets me the value of the last year and then I calculate 5 years back from there but it doesn't seem like a very elegant solution.

Thanks,

Chris N

 

2011  2012  2013  2014  2015  5Y Increase

------------------------------------------------------------

3        4         3        6         10     7

Stef
Telerik team
 answered on 26 Oct 2015
1 answer
51 views

olá! Tenho uma consulta no mysql que faz uma contagem da quantidade de inscrições. Mais no relatório está contando todos os itens da cosulta sem aplicar o filtro. Exemplo: 

SELECT
d.department,  
COUNT(d.cod_department) AS total_professionals

FROM department d
INNER JOIN professionals p ON d.cod_department = p.cod_department

where d.cod_business = 1

GROUP BY d.department 
ORDER BY d.department; 

 

run in mysql it returns:

cod_business      department         total_professionals
1                          department 1      32
1                          department 2      10
1                          department 3      15

no relatório substituindo a clausula where pelos filtros, é gerado o seguinte:

cod_business      department         total_professionals
1                          department 1      ​50
1                          department 2      ​70
1                          department 3      ​20​

 

the report returns the company departments '1', but makes the count in all businesses.

the filter is not being applied in the count.​

Stef
Telerik team
 answered on 23 Oct 2015
3 answers
923 views
I am generating a report in which i want to hide some row if it is blank. I am using conditional formatting. I have unchecked visible check-box. So it supposed to be hidden if condition match.
when i try to change the background color of the row, it works. But with the same condition if i try to hide the row (by unchecking VISIBLE checkbox) it do not hide the row.
Why is this happening.
I am using Telerik Reporting Version: 4.2.10.1130

Reply as soon as possible.
Stef
Telerik team
 answered on 23 Oct 2015
4 answers
200 views

I've applied both grouping and a filtering rule to my table. If one of the elements in a group is rejected by the filter, the entire group is rejected. It appears as if Report Designer filters out every entry in a group if any entry doesn't meet the filtering criteria.

Has anyone run into this problem before? Is there any way to filter data before grouping it?

Saba
Top achievements
Rank 1
 answered on 22 Oct 2015
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?