Telerik Forums
Reporting Forum
3 answers
443 views

Hi,

I'm trying to generate a report with two columns using the approach you guys provided here (https://www.telerik.com/support/kb/reporting/details/how-to-create-multi-column-report---across-the-page-and-then-down).

It's working just fine except when the data return odd number of records. When that happens, the list component generates an extra but empty item (see attach).

I tried to filter but there's no data to be filtered. I tried bindings (visibility) and yet nothing.

Could you help me?

Thanks!

William
Top achievements
Rank 2
 answered on 08 Aug 2018
1 answer
177 views

I am working on a report that consists of a table of values. I have used HTML text boxes in the table as my data is stored in HTML format.

When running the report, it mostly works. However, since the HTML box can't handle embedded image files, I will receive an error for that one cell in the table. This causes the report to expand greatly and push data to other pages.

Is there an expression that can be run to test the value to see if Telerik can render it first? Like an If Error() expression.

 

Brian
Top achievements
Rank 1
 answered on 08 Aug 2018
1 answer
627 views
When we place a table in to a report section .Upon rendering as the section is spanning with page settings and not with its content. We are observing gaps in  the report because of it. Is there any solution to fix this issue or a work around to over come the following issue.
Silviya
Telerik team
 answered on 07 Aug 2018
3 answers
204 views

I've added a special logic on the backend of our reports to automatically measure table column widths.

 

The actual logic works on the preview mode of the designer but when compiled into a .trdp it doesn't work anymore. It's not being called anymore and I'm sure its not called because i added logging on the backend code.

Silviya
Telerik team
 answered on 06 Aug 2018
0 answers
72 views

Hi,

I am using html 5 and html chart at the same page, if I set html chart viable to false the report shows well. 

If I set the html chart viable to true the html chart will show and the html 5 report will be blank. 

Is there a way that do not reset the report with html chart rendering?

I need to show side be side html chart and html5 report at the same page.

Regards,

Omar

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 06 Aug 2018
1 answer
73 views
I am currently running 2018 Reporting R2 (12.1.18.260), and getting the following error on one of the reports:

"An error has occured while processing Report 'MyReport'
The expression contains object 'MyObject' that is not defined in the current context"

What I am doing is simply adding a grouping to the report, using a field from the dataset. It doesn't matter which field I use, they all generate this exact error in grouping. If I remove the grouping, the report runs fine, and I can see every field with appropriate data. There is no special formatting or expressions used at all.

Any idea on how to get this resolved? I have seen this issue on other issues with reports (dealing with expressions in textboxes, etc) but none related to grouping.
Nasko
Telerik team
 answered on 03 Aug 2018
1 answer
144 views

Hi,

I am suffering from slow rendering issue. My data source has more than 1 million records to render. I attached the sample CSV file and report definition. 

Ivan Hristov
Telerik team
 answered on 03 Aug 2018
1 answer
70 views
    Is there anyway to detected in winforms reporting how to tell if a reported has actually been printed successfully.
Nasko
Telerik team
 answered on 03 Aug 2018
4 answers
640 views

I am using the most-current version of Telerik Reporting.  I am testing with a very simple MVVM solution.  The report only has a report header page with a text block in it.  I have the report viewer in the main window and bound to the reportsource in the viewmodel.  The report will not display.  I have looked at several examples and do this same thing but none work for me.

 

public class MainWindowViewModel
        : ViewModelBase
    {
        private string MessageValue = "Nothing to see here...";
        public string Message
        {
            get => MessageValue;
            set
            {
                MessageValue = value;
                RaisePropertyChanged();
            }
        }
 
        private Telerik.Reporting.ReportSource ReportValue;
 
        public Telerik.Reporting.ReportSource Report
        {
            get => ReportValue;
            set
            {
                ReportValue = value;
                RaisePropertyChanged();
            }
        }
 
 
        public void RunReport()
        {
            Message = "Begin report run...";
 
            Task.Run(() => {
                System.Threading.Thread.Sleep(5000);
 
                App.Current.Dispatcher.BeginInvoke(new Action(() => {
                    var rs = new Telerik.Reporting.InstanceReportSource() { ReportDocument = new Report1() };
                    this.Report = rs;
                    Message = "Report complete.";
                }));
 
            });
 
        }
    }

 

 

<Window x:Class="ReportingTest.MainWindow"
        xmlns:local="clr-namespace:ReportingTest"
        xmlns:telerik="http://schemas.telerik.com/wpf"
        DataContext="{Binding MainWindowViewModel, Source={StaticResource ModelLocator}}"
        mc:Ignorable="d"
        Loaded="Window_Loaded"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries />
        </ResourceDictionary>
    </Window.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
 
        <TextBlock Grid.Row="0"
                   Height="25"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   Text="{Binding Message}" />
 
        <telerik:ReportViewer Grid.Row="1"
                              ViewMode="PrintPreview"
                              VerticalAlignment="Stretch"
                              ReportSource="{Binding Report}"
                              HorizontalAlignment="Stretch" />
 
    </Grid>
</Window>
Samuel
Top achievements
Rank 1
 answered on 01 Aug 2018
4 answers
1.3K+ views

I looked for  a long time for this information. I watched YouTube videos, went to blogs, and contacted Telerik support. I decided when I figured this out I was going to post the code so that someone else would not have to struggle with figuring this out like I did. Support helped and pointed me in the right direction to put this together but no easy example to go by. Below is the code for the HTML5 Report Viewer that I use and seems to work exactly like I wanted. It is javascript that parses the URL string and then is fed to the parameters of your report. The only part of this that you should have to change is the the section that is called "reportSource:" the parameters section. In the example below change the first part "TransMonth: " to the name of the parameter you used in your report and change the name at the end to what your URL parameter is called " getParameterByName('TransMonth') " Mine were named the same for simplicity. See the entire code below. Also some of the js and css files have custom paths in the example below. Adjust yours accordingly. I'm far from an expert at this but I know it took me a while to get this working and I thought if I could save someone else this headache I would.

01.<!DOCTYPE html>
03.<head>
04.    <title>Form My Report</title>
05.    
06.    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
07.    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
08. 
09.    <script src="ReportViewer/js/jquery-1.9.1.min.js"></script>
10. 
11.    <link href="ReportViewer/CSS/kendo.common.min.css" rel="stylesheet" />
12.    <link href="ReportViewer/CSS/kendo.blueopal.min.custom.css" rel="stylesheet" />
13. 
14.    <!--kendo.web.min.js or kendo.all.min.js can be used as well instead of the following custom Kendo UI-->
15.    <script src="ReportViewer/js/telerikReportViewer.kendo-12.0.18.416.min.js"></script>
16. 
17.    <script src="ReportViewer/js/telerikReportViewer-12.0.18.416.min.js"></script>
18. 
19.  <style>
20.        #reportViewer1 {
21.            position: absolute;
22.            left: 5px;
23.            right: 5px;
24.            top: 5px;
25.            bottom: 5px;
26.            overflow: hidden;
27.            font-family: Verdana, Arial;
28.        }
29.    </style>
30.</head>
31.<body>
32. 
33.    <div id="reportViewer1">
34.        loading...
35.    </div>
36. 
37.    <script type="text/javascript">
38.        function getParameterByName(name, url) {
39.            if (!url) url = window.location.href;
40.            name = name.replace(/[\[\]]/g, "\\$&");
41.            var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
42.                results = regex.exec(url);
43.            if (!results) return null;
44.            if (!results[2]) return '';
45.            return decodeURIComponent(results[2].replace(/\+/g, " "));
46.        }
47.        $(document).ready(function () {
48.            $("#reportViewer1")
49.                .telerik_ReportViewer({
50. 
51.                    // The URL of the service which will serve reports.
52.                    // The URL corresponds to the name of the controller class (ReportsController).
53.                    // For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
54.                    serviceUrl: "api/reports",
55. 
56.                    // The URL for custom report viewer template. The template can be edited -
57.                    // new functionalities can be added and unneeded ones can be removed.
58.                    // For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
59.                    templateUrl: 'ReportViewer/templates/telerikReportViewerTemplate_custom.html',
60. 
61.                    //ReportSource - report description
62.                    reportSource: {
63.                        // The report can be set to a report file name (trdx report definition)
64.                        // or CLR type name (report class definition).
65.                        report: "ReportApplication.FormMyReport, ReportApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", parameters: {
66.                            TransMonth: getParameterByName('TransMonth'),
67.                            TransYear: getParameterByName('TransYear'),
68.                            PrevMonth: getParameterByName('PrevMonth'),
69.                            ItemName: getParameterByName('ItemName')
70.                    },
71. 
72.                    // Specifies whether the viewer is in interactive or print preview mode.
73.                    // PRINT_PREVIEW - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
74.                    // INTERACTIVE - Displays the report in its original width and height without paging. Additionally interactivity is enabled.
75.                    viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
76. 
77.                    // Sets the scale mode of the viewer.
78.                    // Three modes exist currently:
79.                    // FIT_PAGE - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
80.                    // FIT_PAGE_WIDTH - The report will be zoomed in or out so that the width of the screen and the width of the report match.
81.                    // SPECIFIC - Uses the scale to zoom in and out the report.
82.                    scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
83. 
84.                    // Zoom in and out the report using the scale
85.                    // 1.0 is equal to 100%, i.e. the original size of the report
86.                    scale: 1.0,
87.                    enableAccessibility: false,
88. 
89.                    ready: function () {
90.                        //this.refreshReport();
91.                    },
92.                    }
93.                });
94.        });
95.    </script>
96. 
97.</body>
98.</html>
John
Top achievements
Rank 1
 answered on 01 Aug 2018
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?