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

Moving Standalone to VS

2 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 11 Sep 2015, 06:48 PM

Created a report in the standalone designer and need to utilize it form within Visual Studio.  I have a parameter in both the SQL query and a report parameter, both named Cust_ID.

 

In trying to utilize the uriReportSource, as described in other forum posts, I get an error message as seen in the attached screenshot.

The statement.trdx is in the same directory as my view_statement.aspx page that is trying to render it within the rptstatement viewer.

This is my code:

Public Class view_statement
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If Not IsPostBack Then
            Dim report As New Telerik.Reporting.UriReportSource()
            report.Uri = "statement.trdx"
            If Request("Cust_ID") IsNot Nothing Then
                Dim CustID As Integer = 0
                If Integer.TryParse(Request("Cust_ID").ToString(), CustID) Then
                    report.Parameters.Add(New Telerik.Reporting.Parameter("Cust_ID", CustID))
                End If
            End If
            rptStatement.ReportSource = report
        End If
 
    End Sub
 
End Class

 

Where am I going wrong?

Thank you,

David

2 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 12 Sep 2015, 12:12 PM
Hi David,

Please test mapping the TRDX file on the server by using the Server.MapPath method.
You may also find interesting the How to: Deploy a report created with Standalone Report Designer and Previewing a report definition that uses an external assembly articles.

I hope this helps you.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 16 Sep 2015, 03:12 PM
Thank you.  Server.MapPath resolved the issue.
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Stef
Telerik team
David
Top achievements
Rank 1
Share this question
or