Telerik Forums
Reporting Forum
2 answers
287 views

Hi,

As i see in HTML5, i can user ObjectDataSource for binding data in Report. ObjectDataSource has method like SelectMethod, SelectCountMethod, EnablePaging which i used in ASP.net to bring data partially. is it not possible to bring 50 rows first time & in the scroll next 50 row and so on?

Please let me know.it is urgent

Best Regards

sabbir

 

 

 

Katia
Telerik team
 answered on 18 Aug 2016
1 answer
249 views

Hello

I use this way HTML5 Viewer in AngularJS project in my .NET4, AngularJS project to print telerik reports

the issue is that in some cases when I click print, I want to skip the report viewer screen and jump to print preview screen 

is that possible ??

used code in view.html

$("#reportViewer1").telerik_ReportViewer({
               error: function (e, args) {
                   alert('Error from report directive:' + args);
               },
               reportSource: {
                   report: 'reportname',
               },
               serviceUrl: '/api/reports/',
               
               viewMode: 'PRINT_PREVIEW',
               scaleMode: 'FIT_PAGE_WIDTH',
               scale: 1.0,

 

and used code in reportscontroller.cs

var reportsPath = HttpContext.Current.Server.MapPath("~/");
 
        //Add resolver for trdx report definitions,
        //then add resolver for class report definitions as fallback resolver;
        //finally create the resolver and use it in the ReportServiceConfiguration instance.
        var resolver = new ReportFileResolver(reportsPath)
            .AddFallbackResolver(new ReportTypeResolver());
 
        //Setup the ReportServiceConfiguration
        configurationInstance = new ReportServiceConfiguration
        {
            HostAppId = "Html5AppAJS",
            Storage = new FileStorage(),
            ReportResolver = resolver,
            // ReportSharingTimeout = 0,
            // ClientSessionTimeout = 15,
        };

 

Thanks in advance 

 

Stef
Telerik team
 answered on 18 Aug 2016
1 answer
87 views


I created the report by Telerik Report Design where he consumes a database view and displays the report. Opening the file and clicking preview the report appears.

When I call the web page connection error report.

As I seto the connection to the SQL DataSource through my linking controller with my data sources que with are my command que is in the report?
Stef
Telerik team
 answered on 18 Aug 2016
3 answers
71 views

public static class MyUserFunctions 

{

     public static string Greet(string name)

    {

        return string.Format("Hello, {0}", name);

    }

}

 

Report Designer (standalone), preview is ok.

but programmatic-exporting-report with the template is fail, can not find the function.

how can I resolve the issue?

Stef
Telerik team
 answered on 18 Aug 2016
7 answers
126 views

I have a report that is a bar chart, which I created within VS 2013. I added a data source to the report in the report designer so that I could preview the report. Now I would like to use the report in an asp.net page. I need to be able to retrieve a data set from a web service and assign that to the report as a data source. When I run the report, it ignores the data source I'm trying to assign and always displays the results from the data I tested with.

I have tried setting the data source of the report directly. That doesn't work. I have tried using an objectdatasource. That doesn't work. How do I get the report to dynamically display?

Here is a sample of the code I'm using:

 

     Dim oReportSource As New Telerik.Reporting.InstanceReportSource
     Dim oReport As New ChartReport     
        Dim objectDataSource As New Telerik.Reporting.ObjectDataSource()
    
        Dim ds As New DataSet
        Dim eHCD As New UploadDownload.eHCDReportBroker.eHCDReportBroker

        ClearCache()
        ' ds = eHCD.GetEHCDFilesByPMID(mySession.pmsId)

        'oReport.ReportParameters("pld_file_id").Value = 3784120

        'oReport.DataSource = ds.Tables(0).Select("xmt_typ=" & ddlFileType.SelectedValue.ToString)
        ds = eHCD.GetEHCDCountsByPLDID(pld_file_id, IIf(ddlFileType.SelectedValue = 3, "T", "P"))
        ds.DataSetName = "SqlDataSource1"
        objectDataSource.DataSource = ds

        'oReport.DataSource = objectDataSource
        oReport.DataSource = ds


        ReportViewer1.Visible = True
        oReportSource.ReportDocument = oReport
        ReportViewer1.ReportSource = oReportSource
        Me.ReportViewer1.DataBind()
        ReportViewer1.RefreshData()
        ReportViewer1.RefreshReport()

 

 

Craig
Top achievements
Rank 1
 answered on 17 Aug 2016
3 answers
113 views

When there are multiple Crosstabs on a single report, and you simply want to add an additional column to the Crosstab, ALL other Crosstabs on the report cease to function correctly again unless the crosstab causing the issue is removed, and re-added once again (or you remove the column you are attempting to add).  In this scenario, I want to add a "calculated column" to the Crosstab which displays whether or not "a question was answered".  It works absolutely fine in the first cross tab (see the Designer screen shots), however, attempting to do the exact same steps on a 2nd Crosstab causes the report to be unreadable.

 

Katia
Telerik team
 answered on 16 Aug 2016
5 answers
271 views

Hi,
I have a report that shows eg. Company and department names, I have built a filter by both of these to say

Company in Company parameter
and
Department in Department parameter

Where the Company and Department parameters are multi-value and are built from a datasource. Everything works just fine...as long as at least one company and department value are selected in the filter boxes ie. it is always filtering on these fields.

How do I get the report to display everything when nothing is selected in the filter boxes?

Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 16 Aug 2016
3 answers
104 views

Hi, I want to Show logo on kendo chart, So that When We export chart to pdf, then it should be with our logo. I need help?

 

<div kendo-chart="vm.chart"
                 k-options="vm.chartOptions"
                 k-data-source="vm.chartOptions.datasource">
            </div>

 

This is Export button Click Code:

  vm.saveAsPdf = function (event) {
            var elem ;
            if (navigator.userAgent.indexOf("Chrome") !== -1) {
                elem = event.toElement;
            }
            else {
                elem = event.currentTarget;
            }
            //$(elem).parent().next().find('.k-chart').getKendoChart().saveAsPDF();
            var chart = $(".k-chart").getKendoChart();
            title: {
                    text: "Site Visitors Stats /thousands/"
            }
            var fileName = $(elem).closest('li').children().find('.ng-binding').text().trim();
            chart.exportPDF({ paperSize: "auto", margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" } }).done(function (data) {
                kendo.saveAs({
                    dataURI: data,
                    fileName: fileName + ".pdf"
                });
            });
        }

Stef
Telerik team
 answered on 16 Aug 2016
7 answers
825 views

Hi,

I use trdx files for my reports and switch the database connection at runtime using the connection string manager code here, that code is used in a custom resolver.

Everything works fine but I have now added a parameter to my report that I would like to set the value of in c# at rutime. Looking through the connection manager code listed above I find that 'originalReportSource.Parameters' as below is empty - surely this should contain the parameter that is defined in my report or am I missing something?

ReportSource CreateInstanceReportSource(IReportDocument report, ReportSource originalReportSource)
{
    var instanceReportSource = new InstanceReportSource { ReportDocument = report };
    instanceReportSource.Parameters.AddRange(originalReportSource.Parameters);
    return instanceReportSource;
}

Stef
Telerik team
 answered on 15 Aug 2016
3 answers
320 views

I am using Telerik.Reporting in an ASP.NET MVC5 app.  We have recently upgraded to version 10.1.16.615.  When we deployed to QA, all reports fail with this message:

Error registering the viewer with the service.
An error has occurred.
Access to the path 'C:\Windows\TEMP\MvcApp\10.1.16.615\Cs\A\value.dat' is denied.

I have read several threads on this message, and tried deleting the file and then revising web.config

1. Deleting the file - no joy, next report run creates the file and throws same error.  I ma the only user on the system at this time.

2. Specifying a cache provider.  web.config contains:

under <configuration><configSections>

<section name="Telerik.Reporting" type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=10.1.16.615, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere" />

under <configuration>

<Telerik.Reporting>
    <Cache provider="Memory" />
    <Extensions>
        <Render>
            <Extension name="IMAGE" visible="false" />
            <Extension name="MHTML" visible="false" />
            <Extension name="RTF" visible="false" />
            <Extension name="XPS" visible="false" />
        </Render>
    </Extensions>
</Telerik.Reporting>

The Extension element already existed - just showing the complete set.

Same error, not only restarted site but rebooted machine.

Ideas?

 

 

Stef
Telerik team
 answered on 15 Aug 2016
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?