This is a migrated thread and some comments may be shown as answers.

Sesion Expired Report

6 Answers 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ileana
Top achievements
Rank 1
Ileana asked on 12 Nov 2012, 08:29 PM
Hi, I have a report telerik, in a rad window, then when I want see the report in my page, get de error Sesion expired(attachment file), I read yours KB articules, and I don't what is my case o wich can be the solution ..
In localhost I haven't problems, only when Is the request in my page. Can be a problem in IIS?

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Nov 2012, 01:49 PM
Hi Ileana,

The known reasons for such an error are listed in the Report is unavailable or session has expired error message KB article, which you say you've read. Unfortunately we cannot offer anything concrete if you do not provide us with more information on your project and how/when does the issue occur. For example, does this happen immediately when you open the RadWindow with the report viewer or does it happen after some inactivity? In such case, check the session expiration in your web.config.
Also does it happen everytime or on random basis, if the latter check the machine and IIS logs to verify whether there is some error or your application pool has not been recycled.

Greetings,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Ileana
Top achievements
Rank 1
answered on 14 Nov 2012, 02:42 PM
The scenario is this, I have a radwindow, where is the report viewer, and I assign the report to show through code, because they are two reports in which the user can choose (as show in the picture).
The throws errror when I assign the report.
sometimes immediately open the radwindow
and others when I put the report parameters

0
Ileana
Top achievements
Rank 1
answered on 23 Nov 2012, 02:55 PM
no solution?
0
Steve
Telerik team
answered on 23 Nov 2012, 03:18 PM
Hi Ileana,

You have marked our previous answer as answer, which means that no further help is expected/required. Please check the How to: Add report viewer to a web page help article that shows how to assign report to the viewer programatically and compare it to how you do it.

If the problem persists and it happens on more than one machine, please prepare a sample and open official support ticket where you can attach it for us to review.

Regards,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Ileana
Top achievements
Rank 1
answered on 23 Nov 2012, 04:23 PM
sorry I had not noticed that mark that answer, the problem is in report viewer, now I want to export directly the report 
to pdf, whitout report viewer, I search and I have a few examples 
I can export it but the file is blank.
I don't understand how I can pass the report with parameters, like with crystal reports
how I can assign my report.tdx with my variable report1

Dim report1 As New Telerik.Reporting.Report
Dim uriReportSource As New Telerik.Reporting.UriReportSource()
              
uriReportSource.Uri = Server.MapPath("PCB_Bitacora" & IIf(rcbTypeReport.SelectedValue = "Listado Por Maquinas", "", "_Grafica") & ".trdx")
uriReportSource.Parameters.Add(New Telerik.Reporting.Parameter("@Fecha1", Convert.ToDateTime("11/19/2012").ToShortDateString))

uriReportSource.Parameters.Add(New Telerik.Reporting.Parameter("@Fecha2", Convert.ToDateTime("11/22/2012").ToShortDateString))

report1.DataSource = uriReportSource

SaveReport(report1, Server.MapPath("UploadedFiles\") + "Myreport.pdf ")

Sub SaveReport(report As Telerik.Reporting.Report, fileName As String)
  Dim reportProcessor As New Processing.ReportProcessor()
  Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
  instanceReportSource.ReportDocument = report
   Dim result As Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, Nothing)
        Using fs As New FileStream(fileName, FileMode.Create)
            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
        End Using
End Sub

0
Accepted
Steve
Telerik team
answered on 28 Nov 2012, 02:43 PM
Hello Ileana,

There is some misunderstanding about which is what and where it can be used. Telerik.Reporting.Report is a CLR object, while report.tdx is XML report definition i.e. XML markup.

The Report Sources present uniform way to access Telerik Reports, they are not a data source. When you have an UriReportSource and you set its Uri to a .trdx file, all that is left is to pass that report source to the ReportSource of the report viewer (if you want to display it in viewer) or pass it to the appropriate method (in your case RenderReport). Note that the RenderReport Method accepts any ReportSource, not only instance, so you can pass the UriReportSource directly to that method.

On a side note, if you prefer to work with CLR types and objects, you can deserialize the xml report definition as shown in the Serializing Report Definition in XML help article and proceed from there like you would normally do following the basic concepts of the programming language and the .NET platform.

Kind regards,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Ileana
Top achievements
Rank 1
Answers by
Steve
Telerik team
Ileana
Top achievements
Rank 1
Share this question
or