Telerik Forums
Reporting Forum
1 answer
146 views

I'm trying to output a report from a web application. It's a certificate. Have put the report together and there's batch of these in one output. There's a also 4 sub reports in the main report and I'm passing the main primary key (ObjectID) as parameters to each sub report. So I'm using a filter as follows to the main report:

Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();
filter1.Expression = filterExpression;
filter1.Operator = Telerik.Reporting.FilterOperator.Equal;
filter1.Value = "=True";
certificate.Filters.Add(filter1);
And the filter expression (filterExpression) looks like:

Field.ObjectID = 'rururu9-r84848ue-ririri-rroo' OR Field.ObjectID='094949o4-494949-o49494lkkd9e9-e9e9e' and so on. Obviously those are not correctly formatted or valid GUIDs and only samples.

When I run the report I get the following error. InnerException = {"Invalid value of report parameter 'ObjectID'."}. If I remove the parameters passed through to the sub reports, it works fine - I see the reports and only the reports I want so the filter is working. Each sub report has a parameter called ObjectID and it is linked to the sub report as ObjectID = Field.ObjectID.

Any ideas on why the link and parameters passing doesn't work.

 

Tom
Top achievements
Rank 1
 answered on 07 Jul 2016
9 answers
1.7K+ views
I have recently switched from using the Web Forms report viewer to using the HTML5 Report Viewer for my .NET MVC4 application.  When I try to generate the report, it sometimes works, and sometimes gives the error:

Client with ID 'xxxxxx-xxxx' not found. Expired.

This seems to happen only when deployed on azure, on multiple instances.  I do however have shared cacheing set up which was working fine with the web forms report viewer.

I am initializing the code with 
@{
    var typeReportSource = new TypeReportSource() { TypeName = typeof(MyClass).AssemblyQualifiedName };
}
@(   
   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(true)
)

This happens much more frequently on windows Azure, however I have been able to get it to happen locally, however only by repeatedly spamming the refresh button.
I have not been able to find any cases of anyone receiving this error so any light shinned upon this would be amazing. 


Katia
Telerik team
 answered on 07 Jul 2016
1 answer
700 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
392 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
70 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
566 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
167 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
932 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
921 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
116 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
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?