Telerik Forums
Reporting Forum
2 answers
245 views

Hi

I am using Q2 2014 SP1 of Telerik Reporting.  My report currently contains a single Graph in the detail section.  It has a barSeries and two lineSeries.

However, there are times when I only want to show one of the two line series.

I'm binding the graph to a strongly typed list of objects and the object has a property on it that will let me determine if I want to hide the line series.

 

My specific example is this:

I am already binding my report's DataSource property to ReportItem.DataObject.BowlerValues  (this is my strongly typed list).

My graph might need to show Planned (bar), Forecast (line) and Actual (line) values.

A BowlerValue object has a property on it called "ShowForecast".

If ShowForecast is false, I will want to hide the Forecast Line Series.

 

How can I do this?  Can I use Bindings in any way?

Thanks,
Brent

Brent Hetland
Top achievements
Rank 1
 answered on 29 Jun 2015
3 answers
313 views
Hi. I have two reports that have the same page header, data sources, and etc., but different page footer. I need them to be in a single one report, because I need it to print them together.

Here's the thing. In my view I was using:

var typeReportSource = new TypeReportSource() { TypeName = "../Reports/Report1.trdx" };
typeReportSource.Parameters.Add("IdYear", (object)(Convert.ToInt32(ViewBag.IdYear)));

@(Html.TelerikReporting().ReportViewer()
       .Id("reportViewer1")
       .ServiceUrl("../../api/reports")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
       .ReportSource(typeReportSource)
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
)

And I had the same for Report2. But now I need to have them both in a single Report, and I've read that I can use ReportBook.

The examples I found show code like this:
 reportBook.Reports.Add(new Report1());
 reportBook.Reports.Add(new Report2());


But I am working with the .trdx files, not with the Visual Studio Designer. So I can't figure out how to do it. I found some reads about Activator.CreateInstance

I need some guidance. I am kind of stucked here.

Thanks in advance.
Stef
Telerik team
 answered on 29 Jun 2015
1 answer
197 views

Hello,

 this is my scenario: WPF application with ReportViewer. My report uses a objectDataSource and displays a table with data. The DataMember (method which loads the data) expects 3 parameters: dateFrom, dateTo and a list of strings). I would like to select these parameters with custom input controls and pass them to the report. I don't want to use the built-in parameter selector because it doesn't fulfill my requirements.

 

So it is possible to pass parameters to the report? If I follow the documentation the DataObjectSource is created multiple times (and the data is loaded multiple times) which I don't understand because I only have one ObjectDataSource in my report!

 

Any help would be appreciated!

Christopher
Top achievements
Rank 1
 answered on 27 Jun 2015
2 answers
220 views

Does the new viewer support reports in a class library? I thought this may work, however I am receiving this error:

Type 'Telerik.ReportViewer.Html5.WebForms.ReportSource' in Assembly 'Telerik.ReportViewer.Html5.WebForms, Version=9.1.15.624, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' is not marked as serializable.

 This is the code I am using to display the report. 

Protected Sub CmdReport1Click(sender As Object, e As System.EventArgs) Handles cmdReport.Click
    If Page.IsValid Then
        Dim typeReportSource As New Telerik.ReportViewer.Html5.WebForms.ReportSource
        Dim val As New Telerik.ReportViewer.Html5.WebForms.Parameter
        val.Name = "MYMONTH"
        val.Value = txtRep1Parameter1.Text
        typeReportSource.IdentifierType = Telerik.ReportViewer.Html5.WebForms.IdentifierType.TypeReportSource
        typeReportSource.Identifier = "IntranetReports.Admin.OfficeManager.CeBooking, IntranetReports"
        typeReportSource.Parameters.Add(val)
        ReportViewer1.ReportSource = typeReportSource
    End If
End Sub

Thank you

Scott

Scott
Top achievements
Rank 2
 answered on 26 Jun 2015
1 answer
73 views

Hello Telerik team, 

This issue focuses on one that arises when attempting to export a report in CSV format. 

 As you will see from the attachments, we have a report where two totals are listed on the last two rows of the Report Viewer.  When this report is exported to CSV, those totals are instead duplicated numerous times as two additional rows to the right of the report.

 

 Several files are attached and I believe they will speak for themselves.  This is a significant issue for my company and we are hoping to be able to solve this issue in the very near future. 

 Please let me know if there is a way we can remedy this problem ourselves.  All of the relevant files are attached. 

Thank you for taking the time to review our problem, and we are looking forward to your prompt responses and feedback.

Warmest regards,

 

Tariq Abulaila

Software Engineer,

NCR Corporation Small and Medium Business Team

 

 

 

 

Nasko
Telerik team
 answered on 26 Jun 2015
1 answer
172 views

I am having trouble adding a sub report to my report.  I have created a subreport web page (VB.net).  Here is the code that works for adding the details but the subreport doesn't get displayed.  The top table is the subreport.  Any help is greatly appreciated.

'bottom table
Dim rptReport As New rptMSVS
rptReport.DocumentName = tmpStartDate.ToString("MM.dd.yyyy") 'tab name
rptReport.DataSource = dtBottom

'top table
Dim rptSummary = New sbrSummary
rptSummary.DataSource = dtTop

Dim reportBook As ReportBook = New ReportBook
reportBook.Reports.Add(rptSummary)
reportBook.Reports.Add(rptReport)

'add the sheet to the report
rptMSVS.Reports.Add(rptReport)
rptMSVS.Reports.Add(rptSummary)

 

'display the Report
Dim rptProcessor As New Telerik.Reporting.Processing.ReportProcessor()
Dim instance As New InstanceReportSource()
Dim hshTable As New Hashtable()
instance.ReportDocument = rptMSVS
Dim result As Telerik.Reporting.Processing.RenderingResult = rptProcessor.RenderReport("XLS", instance, hshTable)

rptViewer.ReportSource = instance
rptViewer.DataBind()

Mark
Top achievements
Rank 1
 answered on 25 Jun 2015
3 answers
88 views

I recently upgraded from Q1 2014 to Q2 2015 and now I am having issues on any reports that I prompt for parameters. In the past when I opened the report, I would get an error, but the user could enter the parameters and then properly run the report (See ss1.png). Now I just get an error and no parameters (see ss2.png). Here is what I use for my display code in my MVC Razor page:

 

         @(Html.TelerikReporting().ReportViewer().Id("reportViewer1").ServiceUrl("/api/reports/").TemplateUrl("/scripts/reportviewer/templates/telerikReportViewerTemplate-9.1.15.624.html").ReportSource(new TypeReportSource() { TypeName = "PortalReports.HelpDesk.DeptTicketSummary, PortalReports"}).ViewMode(ViewModes.INTERACTIVE).ScaleMode(ScaleModes.FIT_PAGE_WIDTH).PersistSession(false))

 

What am I missing? The only thing that has changed is the version.

Nasko
Telerik team
 answered on 25 Jun 2015
9 answers
2.4K+ views
Hi,

I am trying to load a simple report in a asp.net mvc web application using TypeReportSource.
But it shows "Internal Server Error: Value cannot be null. Parameter name: key" while making request to the following url

http://localhost:47829/api/reportsApi/clients/154917-9738/instances/154821-14b1/documents/154821-7d50154821-9a39/info

The response:

{"message":"","exceptionMessage":"Value cannot be null.\r\nParameter name: key","exceptionType":"Telerik.Reporting.Services.Engine.DocumentRenderException","stackTrace":"   at Telerik.Reporting.Services.Engine.Document.GetDocumentInfo()\r\n   at Telerik.Reporting.Services.Engine.ReportEngine.GetDocumentInfo(String clientID, String instanceID, String documentID)\r\n   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocumentInfo(String clientID, String instanceID, String documentID)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}

how to resolve this error? same report is working perfectly with wpf application.

Telerik Reporting version Q1 2015 SP1.

Thanks
Doug
Top achievements
Rank 2
 answered on 24 Jun 2015
9 answers
755 views

Hi

I've downloaded trial verion of telerik reporting to try functionality what I need. On demos I haven't seen option to export report to DOCX (i don't know why) also when I tried to export it manualy with RenderingResult result = reportProcessor.RenderReport("DOCX", reportToExport, null); but  I've always seen "DOCX rendering format is not available." message.

Could the trial version be a reason?
Have someone had issue like this?

Best regards
Waclaw

Stef
Telerik team
 answered on 24 Jun 2015
2 answers
895 views

Hi,  Using a textbox in the report to display a date, we can use {0:d} to get a short date, e.g. 01/02/2015, but in our app we allow the user to specify their own format string on a per user basis, so we pass that in as a parameter (typically to get an even shorter format, e.g. 01/02/15).  In the Format field for a TextBox is it possible to use an expression, e.g. =Parameters.dateFormat.Value ? 

 As background we are evaluating converting from SSRS to Telerik reporting, and in SSRS this is possible by just using Parameters.dateFormat.Value in the Format field, but in Telerik this does not seem to work.  I can see that this is possible to do in the Value field using an expression on the lines

 =sFields.startEventDtm.ToString(Parameters.dateFormat.Value)

 But this will fail with a null reference exception of startEventDtm is null, whereas using  a format string will handle the null neatly.

Scott Waye
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 Jun 2015
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?