Telerik Forums
Reporting Forum
2 answers
410 views

Hi, 

We're currently trying to setup a build server using visual studio online, and one of the projects in our solution uses the wpf Report viewer.  We're getting the following errors while that particular project builds.  Would you be able to help?

MSLCRM2\MSLCRM2\Themes\Office2013\Telerik.ReportViewer.Wpf.xaml (13, 6)
The tag 'VisibilityConverter' does not exist in XML namespace 'clr-namespace:Telerik.ReportViewer.Wpf;assembly=Telerik.ReportViewer.Wpf'. Line 13 Position 6.

MSLCRM2\MSLCRM2\Themes\OfficeBlack\Telerik.ReportViewer.Wpf.xaml (31, 6)
The tag 'VisibilityConverter' does not exist in XML namespace 'clr-namespace:Telerik.ReportViewer.Wpf;assembly=Telerik.ReportViewer.Wpf'. Line 31 Position 6.

MSLCRM2\MSLCRM2\Themes\Windows8\Telerik.ReportViewer.Wpf.xaml (33, 6)
The tag 'VisibilityConverter' does not exist in XML namespace 'clr-namespace:Telerik.ReportViewer.Wpf;assembly=Telerik.ReportViewer.Wpf'. Line 33 Position 6.

 

Note: I found this thread and tried to follow the advice in there, but it hasn't worked http://www.telerik.com/forums/build-failure

Senthil
Top achievements
Rank 1
 answered on 16 Jan 2018
2 answers
142 views
We are currently migrating from the older ReportViewer to the newer HTML5 ReportViewer.  We use a ReportBook to display all our reports, regardless if it is one or multiple reports.  Inside the ReportBook’s constructor, a method is called that determines which reports are to be displayed and puts them in a loop that does the following:
1. Uses LINQ to SQL to generate the data to be displayed,
2. Instantiates the report,
3. Assigns the generated data to the report’s DataSource property, and
4. Adds the report to a ReportBook.

All of this is done in code, in the ReportBook’s constructor.  Yes, I realize Telerik probably wouldn’t recommend doing it this way.  The individual reports do not use the designer to create a SqlDataSource, ObjectDataSource, etc…

This design worked with the old ReportViewer because it simply instantiated the ReportBook once on the server and returned markup back to the client.

The HTML5 ReportViewer seems to expect that the report use data sources which are generated as a result of the report being created instead of having the data generated before the report is created.  Our problem is that the HTML5 ReportViewer calls the ReportBook’s constructor 3 times, which results in the data for each report to be generated 3 times.

I have tried using counters to generate the data only 1 of the 3 times the ReportBook’s constructor is called, but the data does not display.  I’ve tried on the first call, the second call, and the third call, but the report does not display the data. 

Therefore, I can’t think of a way to upgrade to the HTML5 ReportViewer without making drastic changes to our reports.

Given our current design, can anyone from Telerik suggest a way to upgrade with minimal changes?
Katia
Telerik team
 answered on 16 Jan 2018
1 answer
273 views

Is there anyway to cancel a report being generated with RenderReport?  For example, we are creating a PDF of a report that takes some time to finish.  Is there any asynchronous ways of creating the report such that we can cancel its execution? 

 

I saw a post on here a few years ago that it couldn't be canceled, but I'm hoping something has been done since then to change this.  Thanks for any guidance.

Example:

ReportProcessor reportProcessor = new ReportProcessor();                      

ReportLibrary.TestReport report = new ReportLibrary.TestReport();                                               InstanceReportSource reportSource = new InstanceReportSource();                         

reportSource.ReportDocument = report;                         

RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, null);

Todor
Telerik team
 answered on 16 Jan 2018
4 answers
349 views

I have a class library where all my reports are. One of my reports needs to be displayed and exported to PDF in landscape mode instead of portrait. In my web application which is a MVC Core application using a target framework of 4.6.1 displays the report fine in the report viewer. 

Do I need to do something with the jQuery to tell the report to print according to the class report settings?

Do I need to set something else in the report definition itself that will take care of it?

See the screenshot for the report properties settings.

Here is the jQuery I am using to render the report viewer:

<script>
    function setReportSource(report) {
        var viewer =
            $("#reportViewer1")
                .data("telerik_ReportViewer");
 
        viewer
            .reportSource({
                report: report
            });
    }
 
 
    $(document).ready(function () {
        $("#reportViewer1")
            .telerik_ReportViewer({
                serviceUrl: "../api/reports/",
                reportSource: {
                    report: "MBIntranet.Reporting.DownTime.ReasonCodeReport, MBIntranet.Reporting",
                    parameters: {}
                },
                viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                scale: 1.0,
            });
 
        $("#reports")
            .on(
            "change",
            function () {
                setReportSource($(this).val());
            });
    });
</script>
Matt
Top achievements
Rank 1
 answered on 15 Jan 2018
1 answer
245 views

im followed this thread but doest work.
https://www.telerik.com/forums/how-to-write-an-oracle-stored-procedure-to-work-with-telerik-reporting-wizard

now im using .netcore 2 mvc. and i want to build report from Report Designer and put it in my project.
but i cant create datasource from Oracle stored.

Please help me.

 

Katia
Telerik team
 answered on 15 Jan 2018
1 answer
141 views

I don't seem to be able to find a chart control for a Funnel. I suspect there is not one at this time.

Has anyone created a work around for this yet using a bar chart?

Silviya
Telerik team
 answered on 15 Jan 2018
2 answers
749 views

Hi,

I have two projects; a website and a web api. (.net Core 2.0 )

The website has the following html;

 $("#reportViewer1")
                .telerik_ReportViewer({
                    //serviceUrl: "/api/reports/",
                    serviceUrl: "@ViewBag.TelerikReportServerUrl",
                    reportSource: {
                        report: "TelerikReportService.Report, TelerikReportService", 
                        //report: "Barcodes Report.trdp",
                        parameters: {}
                    },
                    viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
                    scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                    scale: 1.0,
                });

And within the web API project I have been trying to create an example Report Class file that can be served up to the client.
This is how far I have got, but it wont work and I cannot find an example of this anywhere in the forums.

("Barcodes Report.trdp" works fine, just a CODED report class,  I cannot get to work)

I get the error;

"Unable to get report parameters.
An error has occurred.
Invalid report type"

 

CODED report class: 

namespace TelerikReportService

{
    public partial class SchemeReport : Telerik.Reporting.Report
    {

        public SchemeReport()
        {
            
        }


        public DataTable GetData()
    {
        dynamic table = new DataTable();
        table.Columns.Add("col1", typeof(int));
        table.Columns.Add("col2", typeof(int));

        table.Rows.Add(1, 3);
        table.Rows.Add(4, 6);
        table.Rows.Add(2, 5);
        table.Rows.Add(4, 7);

        return table;
    }



    public Telerik.Reporting.Report GenerateReport()
    {
            
        //create a blank report
        Telerik.Reporting.Report report = new Telerik.Reporting.Report();
        report.Name = "Report1";
        report.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1.0), Telerik.Reporting.Drawing.Unit.Inch(1.0), Telerik.Reporting.Drawing.Unit.Inch(1.0), Telerik.Reporting.Drawing.Unit.Inch(1.0));
        report.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
        report.Width = Telerik.Reporting.Drawing.Unit.Inch(6.0);

        //create a detail section and add it to the report instance's Items collection
        Telerik.Reporting.DetailSection detailSection = new Telerik.Reporting.DetailSection();
        detailSection.Height = Telerik.Reporting.Drawing.Unit.Inch(1);

        detailSection.Name = "DetailSection";
        report.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { detailSection });

        //create a blank Table item
        Telerik.Reporting.Table table1 = new Telerik.Reporting.Table();
        table1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.0), Telerik.Reporting.Drawing.Unit.Inch(0.0));
        table1.Name = "Table1";
        table1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(4), Telerik.Reporting.Drawing.Unit.Inch(1));


        //get the data for the table
        dynamic data = GetData();
        table1.DataSource = data;

        //create a dynamic row group
        Telerik.Reporting.TableGroup DetailRowGroup = new Telerik.Reporting.TableGroup();
        DetailRowGroup.Groupings.Add(new Telerik.Reporting.Grouping(null));
        DetailRowGroup.Name = "DetailRowGroup";
        table1.RowGroups.Add(DetailRowGroup);
        //add a row container
        table1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.5)));


        //add columns
        for (int i = 0; i <= data.Columns.Count - 1; i++)
        {
            //add a column container
            table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(2)));
            //add a static column group per data field
            Telerik.Reporting.TableGroup columnGroup = new Telerik.Reporting.TableGroup();
            table1.ColumnGroups.Add(columnGroup);

            //header textbox
            Telerik.Reporting.TextBox headerTextBox = new Telerik.Reporting.TextBox();
            headerTextBox.Name = "headerTextBox" + i.ToString();
            headerTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2), Telerik.Reporting.Drawing.Unit.Inch(0.5));
            headerTextBox.Value = data.Columns[i].ColumnName;
            columnGroup.ReportItem = headerTextBox;

            //field that will be displayed
            Telerik.Reporting.TextBox detailRowTextBox = new Telerik.Reporting.TextBox();
            detailRowTextBox.Name = "detailRowTextBox" + i.ToString();
            detailRowTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2), Telerik.Reporting.Drawing.Unit.Inch(0.5));
            detailRowTextBox.Value = "= Fields.[" + data.Columns[i].ColumnName + "]";
            table1.Body.SetCellContent(0, i, detailRowTextBox);

            //add the nested items in the Table.Items collection
            table1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            headerTextBox,
            detailRowTextBox
        });

        }

        //add total group - static group out of the detail row group
        table1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.5)));
        Telerik.Reporting.TableGroup totalRowGroup = new Telerik.Reporting.TableGroup();
        totalRowGroup.Name = "totalRowGroup";
        table1.RowGroups.Add(totalRowGroup);
        for (int i = 0; i <= data.Columns.Count - 1; i++)
        {
            Telerik.Reporting.TextBox totalRowTextBox = new Telerik.Reporting.TextBox();
            totalRowTextBox.Name = "detailRowTextBox" + i.ToString();
            totalRowTextBox.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2), Telerik.Reporting.Drawing.Unit.Inch(0.5));
            totalRowTextBox.Value = "= Sum(Fields.[" + data.Columns[i].ColumnName + "])";

            totalRowTextBox.Style.BackgroundColor = Color.Azure;
            table1.Body.SetCellContent(1, i, totalRowTextBox);
        }


        //add the table in the detail section's Items collection
        detailSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { table1 });


        return report;
    }
    }
}

 

Todor
Telerik team
 answered on 12 Jan 2018
2 answers
275 views

I am getting the following error when trying to use rollup to bundle my app which is using the Angular report viewer module:

 

?   'ReportViewer' is not exported by node_modules\@progress\telerik-angular-report-viewer\dist\dependencies\telerikReportViewer.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules\@progress\telerik-angular-report-viewer\dist\es\telerik-report-viewer.component.js (6:9)
4: window.jQuery = jquery;
5: import '../dependencies/telerikReportViewer.kendo-2016.3.914.min';
6: import { ReportViewer } from '../dependencies/telerikReportViewer';
            ^
7: var TelerikReportViewerComponent = /** @class */ (function () {
8:     function TelerikReportViewerComponent() {

 

I followed the link in the error description but am not sure what to put in the commonjs section of rollup.config (if this is the issue), this didn't seem to do anything:

    plugins: [
        nodeResolve({jsnext: true, module: true}),
        commonjs({
            include: 'node_modules/**', 
namedExports: {
                'chart.js': ['Chart'], 
                '@progress/telerik-angular-report-viewer': ['ReportViewer']
}, 
        }),
        uglify()
    ]

Mario
Top achievements
Rank 1
 answered on 11 Jan 2018
2 answers
144 views

Hi, 

I Created a report, when i preview the report it works fine but  sometimes i get " InnerException" Error. I don't understand why i am getting this error. Please can anyone help me. Please find the below attached image. 
Thanks,
Mans

Brian
Top achievements
Rank 1
 answered on 11 Jan 2018
0 answers
171 views

While trying to open my coded step which is a vb I get this error and can't open it.

 

The invocation of the constructor on type 'ActiproSoftware.Windows.Controls.Syntaxeditor.Syndaxeditor' that matches the specified binding constraints threw an exception

Charitos
Top achievements
Rank 1
 asked on 11 Jan 2018
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?