Telerik Forums
Reporting Forum
7 answers
1.3K+ views

Hi

 

I have a Web Api project with Telerik reporting, and a client Angular site that hosts the reportviewer.

The report files are compiled into the dll, ie. are not trdx files

 

I have had the following issues.

The initial call works and the report is displayed. However, subsequent calls just redisplay the initial report. I have verified this by changing the report and recompiling, as well as making changes in the database, yet the report does not change.

My ReportsController is 

 

protected override IReportResolver CreateReportResolver()
{
    return new ReportTypeResolver();
}
 
protected override ICache CreateCache()
{
   return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
}

 

I tried to resolve this by overriding CreateStorage

protected override IStorage CreateStorage()
{
    return new MsSqlServerStorage(@"Server=.\BF;database=Reporting;Integrated Security=true");
}

But when I do this I get a timeout exception when the report is being resolved 

Error creating report instance (Report = NPS.Reports.Simple, NPS.Reports):
An error has occurred.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.

I have  the Fiddler trace as well as the SQL Server profiler trace, but cannot attach them so I have just attached screenshots.

The full exception is

stackTrace=   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Telerik.Reporting.Cache.MsSqlServerStorage.AcquireLock(String key)
   at Telerik.Reporting.Services.Engine.KeyItemPersistableCollection`2.ResolveItem(K referredInstanceKey, Boolean& newItem)
   at Telerik.Reporting.Services.Engine.ReportEngine.CreateReportInstance(String clientID, String report, Dictionary`2 parameterValues)
   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.CreateInstance(String clientID, ClientReportSource reportSource)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

Note that for this trace I used a very simple report that has no parameters and no datasource, just a single textbox.

Thanks

 

Colin Mierowsky

Stef
Telerik team
 answered on 12 Jul 2016
4 answers
111 views

Hi I'm trying to keep Localizable property, I create a report (in default Language), after I setup Language = English (en) and translate static object.

I'm using this code to show report preview, but when LinguaParameter contains "en" Language, it has no effect. Why?

I've attach design of report.

01.Private Sub ReportForm_Load(sender As Object, e As EventArgs) Handles Me.Load
02. 
03.    'Cerco il parametro lingua
04.    Dim _CultureInfo As System.Globalization.CultureInfo = Nothing
05.    Dim _LinguaParameter = m_Parameters.SingleOrDefault(Function(rec) rec.Name.StartsWith("Lingua"))
06. 
07.    If _LinguaParameter IsNot Nothing Then
08. 
09.        If CStr(_LinguaParameter.Value) <> Lingua.LinguaItaliana Then
10. 
11.            _CultureInfo = New System.Globalization.CultureInfo(Lingua.Items.Single(Function(rec) rec.Descrizione = CStr(_LinguaParameter.Value)).Codice)
12.            System.Threading.Thread.CurrentThread.CurrentUICulture = _CultureInfo
13. 
14.        End If
15. 
16.    End If
17. 
18.    MainReportViewer.ViewMode = Telerik.ReportViewer.WinForms.ViewMode.PrintPreview
19. 
20.    Dim _Instance As New InstanceReportSource
21.    _Instance.ReportDocument = m_ReportToShow
22. 
23.    If m_Parameters IsNot Nothing Then
24.        _Instance.Parameters.AddRange(m_Parameters)
25.    End If
26. 
27.    MainReportViewer.ReportSource = _Instance
28. 
29.    MainReportViewer.RefreshReport()
30. 
31.End Sub

Dario Concilio
Top achievements
Rank 2
 answered on 12 Jul 2016
1 answer
460 views

I've unpackage on of my report to the trdp file. 

After i loaded report this report at run time (from the same Application) it seems fails to use my custom fuctions.

for example a static method from names  itr.tms.reports.helper.concate used in for value as

=itr.tms.reports.helper.concate('*',Array(someomefield))

results following error. 

 

is it possible to use Custom function in trdp files?

Stef
Telerik team
 answered on 11 Jul 2016
1 answer
98 views

Is there any external format for telerik raporting which we can embedded into report at runtime?

if there is :

Is there any UIEditor for these format we can emdeded int ouer WPF porgramm to enable user to edit the Documents in this format?

Katia
Telerik team
 answered on 11 Jul 2016
5 answers
367 views

Hello folks,

I created a Windows Form application, and embedded my report on it with Report Viewer Form. I have downdrill crosstabs and graphs on this report.

Problem is, when click ToggleVisibleAction mark on my report to expand the tab, it refreshing all of report and returning view to top of the report/page, which is really annoying if table has too many rows. I want to disable this refreshing thing.

Is there any setting or property to disable this and refresh the table/graph dynamically?

 

By the way, the report all made in VS designer and edited little on C# side.

 

Hopefuly you can solve my problem :)
Thank You!

Regards.

Nasko
Telerik team
 answered on 11 Jul 2016
3 answers
201 views

Shouldn't the page footer print on every page even if I'm using a ReportBook?

 

In the end I'm going to combine 2 different reports but for testing this I'm just adding 1 report twice (or more, the page footer only shows on the last page).

 

This is my code, am I doing something wrong?

 

Imports Telerik.Reporting

Partial Class MA_PrintPreview
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim report As New Reports2.ContractNew
        report.ReportParameters(0).Value = Me.Request.QueryString("PlanID")

        Dim reportBook As New ReportBook()
        reportBook.Reports.Add(report)
        reportBook.Reports.Add(report)


        Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
        instanceReportSource.ReportDocument = reportBook
        'ReportViewer1.Report = report

        ReportViewer1.ReportSource = instanceReportSource

    End Sub
End Class

Warren
Top achievements
Rank 1
 answered on 08 Jul 2016
3 answers
294 views

Hi guys,

any suggestions on how to achieve the following:

- When exporting a report to word some of the paragraphs (telerik report text boxes) marked as having Word Styles (Heading 1/2/3...)

- When exporting a report to word some of the paragraphs (telerik report text boxes) marked as Word Numbering/Bullet.

Katia
Telerik team
 answered on 08 Jul 2016
1 answer
240 views

Hi,

We have main report which will fetch data from db and display it in report. when user click on data row we are navigating to another report.

In our another report we have to show filtered data of main report.

We don't  want to re fetch same data again  from db.  So how we can pass main report datasource  to another report ?

What  is the best way to implement. we are using 2015 q3

 

Nasko
Telerik team
 answered on 08 Jul 2016
1 answer
291 views
Hello. How can I disable the borders around the detail section visible only when exported into PDF? It is not enabled in the designer, so I dont understand, why it can be seen in the preview or when it is exported into PDF. When printed out, top and bottom borders of the detail section are printed (sides are not). See the attached screenshots of the exported pdf. Thank you
Nasko
Telerik team
 answered on 08 Jul 2016
1 answer
245 views

Hello,

   We are currently having a problem seeing the design view on one of our existing reports in Visual Studio 2015, all that shows up is the options(attatched) when we click on it. None of the options load up the designer view, along with any options on the menu for these options. We have tried going through the Upgrade Wizard process and building many times but that didn't help either. We are currently using Telerik Reporting Q3 version 9.2.15.1126.

Nasko
Telerik team
 answered on 08 Jul 2016
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?