Telerik Forums
Reporting Forum
1 answer
714 views

Hi to all,

I have a ObjectDataSource that has a property that return List of object

I would use this ones to populate a table object, after that Group by a particular field of list.

But when I try to add group on this table and try to exec report, It show me an error "This field not found in context"

 

Ex. I tryed to group on ReportItem.DataObject.RawData.FamilyCode

Table is in binding with MyMainObject.Rows that returns List<MyDetailedObject>

MyDetailedObject.FamilyCode exists!

Why?

Nasko
Telerik team
 answered on 07 Jul 2016
1 answer
398 views

When I execute the report locally, it executes well. But when we published it on the web the report shows the followed error "Error registering the viewer with the service. An error has occurred.Object reference not set to an instance of an object."

Code snippets:

var viewer = $("#smsReportViewer").telerik_ReportViewer({

                          serviceUrl: "/api/reports/",

                          reportSource: {

                              report: "SMSWebClient.Reports.AccountsReport1, SMSWebClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",

                              parameters: params

                          },

                          viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,

                          scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,

                          scale: 1.0,

                          ready: function () {

                              $("#smsReportViewer").css("height", $(document).height() - 200)

                              checkResizeNeeded();

                          },

                      });

 

Below, the Stack trace
"   at Telerik.Reporting.Cache.CacheStorage.AddInSet(String key, String value) in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Cache\CacheStorage.cs:line 271
   at Telerik.Reporting.Services.Engine.PersistableCollection`1.NewItem(String newID, Action`1 initializeObject) in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.Engine\PersistableCollection.cs:line 30
   at Telerik.Reporting.Services.Engine.ReportEngine.RegisterClient() in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.Engine\ReportEngine.cs:line 83
   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.RegisterClient() in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.WebApi\ReportsControllerBase.cs:line 128
   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.ActionExecutor.Execute(Object instance, Object[] arguments)
   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.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.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.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"

Kindly note that we tried the following (via web config and webapi caching overrides):
- used file based caching
- used memory based caching
- used IsolatedMode in caching

And also reset the security permissions for app pool user and still same issue occurs.

I attached the error message
Katia
Telerik team
 answered on 06 Jul 2016
2 answers
72 views

I need simple customized text (simple rtf or HTML font type/ color/ tabs) to set it into footer or header of the report in  WPF application. 

I thought, thet it is the best way is to use radrichtext editor to enable user editing the templates. but it seems that the richtexteditors html  output is'nt compatible with htmlreport input. is there any simple way to get formated text from some telerik ui component to report? perhaps some  RTF komponent or Report compatible formatter?

Katia
Telerik team
 answered on 06 Jul 2016
11 answers
575 views

Thank you in advance for any feedback!

I am getting the following error when program reaches the line of code:

Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", oReportSource, deviceInfo)

Then, I tried stepping, and program goes to GetUserName() function.  And after this is run the following message comes up.  This is only happening with the new Telerik update of the Reporting Designer R2 2016.

ERROR: An exception of type 'System.IndexOutOfRangeException' occurred in Telerik.Reporting.dll but was not handled in user code
Additional information: Index was outside the bounds of the array.

 

 

Public Function TelerikReportDS(dObjs As DataObjects, reportName As String, Optional ByVal styleName As String = "") As System.IO.Stream
        Dim oData As DataObjects = dObjs


        Dim report As Telerik.Reporting.Report = GetReport(reportName)

        If Not String.IsNullOrEmpty(styleName) Then report.StyleName = styleName
        If Not report Is Nothing Then
            Using ds As New Telerik.Reporting.ObjectDataSource
                ds.DataSource = oData

                Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor()
                Dim deviceInfo As New System.Collections.Hashtable()
                report.DataSource = ds

                Dim strName As String
                Dim intCount As Integer
                Dim bAttach As Boolean = False
                Dim bHist As Boolean = False
                Dim bProp As Boolean = False
                Dim bStateActors As Boolean = False

                If (reportName = "Binder.trdx") Then

                    For ii As Integer = 0 To dObjs(0).Properties.Count - 1
                        strName = dObjs(0).Properties(ii).Name
                        If (strName = "binderProperties") Then
                            intCount = dObjs(0).Properties(ii).Value.Count
                            If (intCount = 0) Then
                                bProp = False
                            Else
                                bProp = True
                            End If
                        End If
                        If (strName = "states") Then
                            intCount = dObjs(0).Properties(ii).Value.Count
                            If (intCount > 0) Then
                                For xx As Integer = 0 To dObjs(0).Properties(ii).Value.Count - 1
                                    intCount = dObjs(0).Properties(ii).Value(xx).Properties.Count
                                    If (intCount > 0) Then
                                        For yy As Integer = 0 To dObjs(0).Properties(ii).Value(xx).Properties.Count - 1
                                            strName = dObjs(0).Properties(ii).Value(xx).Properties(yy).Name
                                            If (strName = "stateActors") Then
                                                If (intCount = 0) Then
                                                    bStateActors = False
                                                Else
                                                    bStateActors = True
                                                End If
                                            End If
                                        Next yy
                                    End If
                                Next xx
                            End If
                        End If
                        If (strName = "binderDispositionHistoryItems") Then
                            intCount = dObjs(0).Properties(ii).Value.Count
                            If (intCount = 0) Then
                                bHist = False
                            Else
                                bHist = True
                            End If
                        End If
                        If (strName = "snapshotObjects") Then
                            intCount = dObjs(0).Properties(ii).Value.Count
                            If (intCount = 0) Then
                                bAttach = False
                            Else
                                bAttach = True
                            End If
                        End If
                    Next ii

                    intCount = report.Items(2).Items.Count
                    For xx As Integer = 0 To report.Items(2).Items.Count - 1
                        strName = report.Items(2).Items(xx).Name
                        If (strName = "PropertiesTable") Then
                            report.Items(2).Items(xx).Visible = bProp
                        End If
                        If (strName = "AttachmentsTable") Then
                            report.Items(2).Items(xx).Visible = bAttach
                        End If
                        If (strName = "HistoryTable") Then
                            report.Items(2).Items(xx).Visible = bHist
                        End If
                    Next xx
                End If

                Dim oReportSource As New Telerik.Reporting.InstanceReportSource
                oReportSource.ReportDocument = report

                Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", oReportSource, deviceInfo)
                Dim oMemoryStream As New System.IO.MemoryStream(result.DocumentBytes)
                Return oMemoryStream
            End Using
        Else
            Return Nothing
        End If
    End Function

 

---- User defined functions

   Public Shared Function GetUserName(ByVal userID As String) As String
        If String.IsNullOrEmpty(userID) Then Return ""

        Dim oItem As NameLookupItem = _nameCache.FindItem(userID)
        If Not oItem Is Nothing Then Return oItem.displayName


        Dim oDA As New FHFATools.AD.ADCentralDA
        Dim oDO As FHFATools.Database.DataObjects = oDA.GetDomainObjects2(userID)
        If oDO.Count = 0 Then Return userID
        Dim displayName As String = oDO(0).GetValueString("DisplayName")
        If String.IsNullOrEmpty(displayName) Then displayName = userID

        _nameCache.AddItem(userID, displayName)

        Return displayName
    End Function

 

        Public Function FindItem(ByVal userID As String) As NameLookupItem
            userID = userID.ToLower()
            Dim oReturn As NameLookupItem = Nothing
            For Each item As NameLookupItem In Me
                If item.userID.Equals(userID) Then
                    oReturn = item
                    Exit For
                End If
            Next
            If Not oReturn Is Nothing Then
                If oReturn.lookupTime.AddMinutes(CACHE_TIME_MINUTES) < Date.Now() Then
                    Me.Remove(oReturn)
                    oReturn = Nothing
                End If
            End If
            Return oReturn
        End Function

Nasko
Telerik team
 answered on 06 Jul 2016
1 answer
171 views

Hi to all,

I need to create a report that it contains 2 ObjectDataSource:

1st: return a List of objects that I have to show on report

2nd: return an object that contains company information

 

I need show 2nd item into pageheadersection and 1st normally using in detailed

 

how can I do?

Nasko
Telerik team
 answered on 06 Jul 2016
2 answers
940 views

Thank you in advance for any feedback!

I got a nested table residing within another table textbox; when the nested table does not produce data for a row of the primary table, I get a system.indexoutofrangeexception.  How can I fix this issue?  I've been trying to hide the table, but I don't think I am doing it right.

This is the binding data source for the nested table: = ReportItem.DataObject.RawData.GetValue("stateActors")                                                                                    This is the field I am trying to display  = ReportItem.DataObject.RawData.GetValueString("ADObject_DisplayName")

I did set the visible property path condition to = Count(1) = 0, but it is not working

 

Nasko
Telerik team
 answered on 06 Jul 2016
3 answers
940 views
Hi,

   i have 3  Report parameters that are follows

1. GraphCategory - drop down list contains the values like "lab","user"
2 . Users - drop down list - binding data source from database
3.  Labs - drop down list - binding data source from database

i need to hide/show the users/labs parameter based on graph category selected.
For example, if selecting the category as "lab", need to show the "Labs" parameter, if selecting "user", need to show the "Users" parameter and hide the "Labs" parameter.

Please help  me how to hide and show the parameters based on condition?

Thanks for any help





Katia
Telerik team
 answered on 05 Jul 2016
1 answer
122 views
reporting is not working. when I am using telerik import wizard it getting some error like crystaldecision.Crystalreport.engine.reportdocument. How to convert crystal report 13.0.
Katia
Telerik team
 answered on 05 Jul 2016
2 answers
423 views

I am creating a report in the report designer.

My rows looks like this:

Name, TripID, DepartureDate

I have a row group that is grouping by Name.

I have two parameters, Start and End.

My table displays:

=Fields.Name, =Count(Fields.TripID)

My row group has two filters, so that the Start and End parameters filter rows if the departure date is not between Start and End.

Right now my display for Count(Fields.TripID) always displays the count of unfiltered rows.  What do I need to do to get the Count of filtered rows?

Scott
Top achievements
Rank 1
 answered on 05 Jul 2016
1 answer
244 views

I have a table on a report and I need to be able to have a 1 as a superscript in the textbox.  I have tried a number of methods. I know I can use an htmTextbox and superscript works but the is when an expression is not used.

=IIF(Parameters.InceptionMonths > 11, Format("{0:P2}",Fields.InceptionReturn) + " " + &#185 Format("{0:P2}",Fields.InceptionReturn))

I get the error that it is a missing operand before "&" operator.  when I use <sup> I get the same basic error.  I cannot use chr(185).

Katia
Telerik team
 answered on 05 Jul 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?