Telerik Forums
Reporting Forum
1 answer
98 views
it's possible to search for something within a report inside the Windows Forms Report Viewer ?
Nasko
Telerik team
 answered on 18 Jul 2014
1 answer
110 views
We tend to update reports very often and need to know what version of a report the user is using when they ask questions. Is there any way to display the revision number of a report or the last date that they file was written?

Thanks,
Don Rule
http://translationalsoftware.com
Hinata
Top achievements
Rank 1
 answered on 18 Jul 2014
1 answer
439 views
Hello,

I have a master report which contains many subreports. Every subreport uses its own datasource with its own design. Their visibility is controlled via the binding property of the subreport.

It looks like all subreports are bound to their SqlDatasource regardless of if they're visible or not. Is there an easy way to bind only the subreports to their datasources which are visible?

I'm using the Report Designer for Visual Studio.
Nasko
Telerik team
 answered on 18 Jul 2014
1 answer
172 views
Hi,

I just updated my telerik version to 2014.
I had this code:

ReportViewer1.Report = report; (report is Telerik.Reoporting.Report object).
But I get an error that ReportViewer1.Report is obsolete.

What should I do in order to display "Telerik.Reporting.Report" item inside report viewer as I did in the past?


Stef
Telerik team
 answered on 17 Jul 2014
23 answers
294 views
Hello

We have updated a few projects pereviously written under SL3 with Telerik components v. 2009.3.1120.1030 , reporting v.3.2.9.1104 to SL4  v. 2010.3.1110.1040  reporting v. 4.2.10.1110, containing few reports. In the SL3 version, the globalization of the reportviewer worked o.k. following the (obsolete?, it's from 2008) KB-article (http://www.telerik.com/support/kb/reporting/report-viewers/localizing-the-telerik-report-viewer.aspx).

While the localization of the SL-forms and the reports (titles, labels, etc. in code behind) works, the reportviewer's buttons and tooltips do not display the localized values from Telerik.ReportViewer.WebForms.Resources.[culture].resx placed in the App_GlobalResources folder.

Checking the threads at runtime, all culture info (in silverlight AND Web-part) is reflecting the selected culture, but no go for the viewer... it does not adopt any of the cultures! Am I missing something?

Greetings
Rudolf
Stef
Telerik team
 answered on 17 Jul 2014
1 answer
214 views
I follow the blog post from Establishing a Telerik RESTful Reporting Service in under 5 Minutes and I can now have the web api up and run.

For all the report (trdx file) in the web api, we need to state the connection string in the web.config, but for our case, we have a class which provide the DB connection string to the program like:

Container ctx = new Container();

reportSource = ctx.ConnectionString;

How can I implement to my new Web API project in this case?
Stef
Telerik team
 answered on 16 Jul 2014
1 answer
82 views
We need to design a report which one of the parameter is multi selection from a table, but the table contain over 3000+ records.

Is there a way (or similar) which we can do a search first, then add the value to the parameter, then execute the report?
Stef
Telerik team
 answered on 16 Jul 2014
3 answers
1.8K+ views
I've recently began updating one of our projects from Reporting Q1 2013 to Q2 2014, but have ran into the problem of trying to pass a Model to an objectdatasource.  Previously, I used http://blogs.telerik.com/careypayette/posts/13-03-26/telerik-reporting-in-mvc-sure-it-takes-8-quick-steps- to display the ReportViewer using .aspx and would use an InstanceReportSource to render the report:

aspx View
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MyProject.Models.MyModel>" %>

protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        var instanceReportSource = new InstanceReportSource();
 
        Report report = new Report1(Model);
 
        instanceReportSource.ReportDocument = report;
 
        ReportViewer1.ReportSource = instanceReportSource;
        ReportViewer1.ViewMode = ViewMode.Interactive;
    }

Report class:
using MyProject.Models;

namespace Admissions.Reports
{
    using Telerik.Reporting;
 
    public partial class Report1 : Report
    {
        public Report1()
        {
            InitializeComponent();
        }
 
        public Report1(MyModel model) : this()
        {
            DataSource = model;
        }
    }
}


With the new version of Telerik Reporting, InstanceReportSource is obsolete when using the new razor syntax to generate the report so we have to use UriReportSource or TypeReportSource.

@{
    var uriRS = new UriReportSource() { Uri = "1"};
}
@(
Html.TelerikReporting().ReportViewer().Id("reportViewer1")
   .ServiceUrl("/api/reports/")
   .TemplateUrl("/Content/ReportViewer/templates/telerikReportViewerTemplate.html")
        .ReportSource(uriRS)
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(false)
      )

I've tried to use a custom report resolver (example at bottom of OP (http://www.telerik.com/forums/%27bad-request%27---%27missing-report-name%27-when-using-instancereportsource-in-asp-net-mvc-report-viewer), and was able to pass data in using InstanceReportSource, but I wasn't able to attach any report parameters since the Model is being populated inside of the resolver (which I'd prefer not to do) and the report is created in the resolver and not actually using any parameters from the view.

namespace Admissions.Controllers
{
    public class ReportsController : ReportsControllerBase
    {
        protected override ICache CreateCache()
        {
            return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
        }
 
        protected override IReportResolver CreateReportResolver()
        {
            return new CustomReportResolver();
        }
    }
 
    public class CustomReportResolver : IReportResolver
    {
        public ReportSource Resolve(string reportId)
        {
            var report = new Report();
 
            report = new Report1(new DashboardViewModel { TotalRolesCount = "Hello Report World" });
 
            var irs = new InstanceReportSource { ReportDocument = report };
 
            return irs;
        }
    }
}

Has anyone found a way to pass the Model directly into the report, (var report = new Report1(Model) ); or a solution that would work equally well?
Stef
Telerik team
 answered on 16 Jul 2014
1 answer
130 views
I have a report with a sub report that I use for Hierarchial data.  On the sub reports I have the data indented slightly.  This of course causes the width of the sub report, which is equal to the parent report, except it is also indented, so it hangs off the edge of the parent.  How can I fix this?
Hinata
Top achievements
Rank 1
 answered on 16 Jul 2014
4 answers
1.5K+ views
I'm trying to create a report where the data only exists at runtime.  Currently our system calculates this data and returns it as a datatable.  From what I have read, it seems like I can, at runtime assign this table as the datasouce for a report with a a datasource of ObjectDataSource.

Unfortunately I'm striking out.   Here is my code for a simple test

​ 'perform the projections - this calls a routine that returns the desired table in odt2
oUtilities.PerformSingleProjection(CInt(SSG.Common.WebUtil.GetQueryStringValue("courseID")), CInt(SSG.Common.WebUtil.GetQueryStringValue("scheduleID")), odt, odt2, bOngoingUnitsExist, bSuccessfulProjections)

' Creating and configuring the ObjectDataSource component:
Dim objectDataSource As New Telerik.Reporting.ObjectDataSource()
Dim report As New BYOC.ReportLib.ProjectionDetails_KCG
objectDataSource.DataSource = odt2
report.DataSource = objectDataSource
instanceReportSource.ReportDocument = report

​ReportViewer1.ReportSource = instanceReportSource
ReportViewer1.RefreshReport()

On the report my only logic is that the Datasource property is set to ObjectDataSource1 (with no configurations on the objectdatasource) and I have one text field set to =Fields.DisplayText which is a column in the odt2 table.

Unfortunately the report runs but is blank and I can tell that odt2 has 13 rows in it.

What am I missing??

Thanks

Chris

Nasko
Telerik team
 answered on 16 Jul 2014
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?