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

Moving a report from designer to app?

12 Answers 513 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Ed Lance
Top achievements
Rank 1
Ed Lance asked on 12 Oct 2012, 12:08 AM
I am considering giving some users the stand alone designer so they can make some of their own reports.  I know one question that will be asked, "if we make a report we like, how do we get it in our web site?"  In other words, they prototype reports and play around with them.  When they get one they like a lot, they would want me to put it in the VS project so they can view it in the main web site.

So, the report designer saves to a .trdx file.  But the project files are code (vb or cs).  So how to do the import?  I would have expected an "Import trdx file" in the VS Telerik Reporting menu.  Am I missing something? 

Thanks.

12 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 12 Oct 2012, 12:25 PM
Hello Ed,

The trdx report definitions don't have to be included in the project. You can only copy them on the server and in code you can iterate through the files in the folder, display list of available reports in a drop down and show the selected report in report viewer with UriReportSource.

Kind regards,
Peter
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
Ed Lance
Top achievements
Rank 1
answered on 12 Oct 2012, 05:39 PM
Peter,
Thanks, I will give that a try, i wasn't familiar with the UriReportSource. 

Still think it would be a really good idea to have something that can covert a .trdx into a report class file.
0
Sean Drun
Top achievements
Rank 1
answered on 18 Oct 2012, 07:13 PM
Hello,
Any follow up about this issue.
I load the latest Q3 2012, play with standalone designer, save a report layout to trdx file, load in into web ReportView by
Telerik.Reporting.UriReportSource urs = new Telerik.Reporting.UriReportSource();
urs.Uri = trdxPathNFileName;
ReportView1.ReportSource = urs;
The web page shows and hang.

We are evaluating telerik reporting.
Please give a working example in web project.

Thanks,
Sean Drun
0
Peter
Telerik team
answered on 19 Oct 2012, 10:36 AM
Hi Sean,

Check out the attached sample and if you experience any further difficulties please elaborate further on your scenarios and any exceptions.

Greetings,
Peter
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
Sean Drun
Top achievements
Rank 1
answered on 19 Oct 2012, 06:03 PM
Hi Peter,
Thank you for the sample project file.
I test run it and it does load and show trdx file on web page.
But the same code, trdx just won't show on my web page.
After try and error a while, I think it is the style problem of ReportViewer.
We are using Telerik Ajax radcontrol to develop our web app.
When ReportViewer declared in RadControl web page, it just won't show any report content.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.ReportViewer.WebForms" Namespace="Telerik.ReportViewer.WebForms" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">        
        html#html, body#body, form#form1, div#content, center#center
        {  
            border: 0px solid black;
            padding: 0px;
            margin: 0px;
            height: 100%;
        }
    </style>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div id="content"><center id="center">
        <telerik:ReportViewer ID="ReportViewer1" runat="server" width="99%" height="99%"></telerik:ReportViewer>
        </center>
    </div>
    </form>
</body>
</html>
If I change width, height of the ReportView1 to fix px, then it shows report context.
What's is the correct style or solution to make ReportViewer take up whole web page space?
I have tried the suggestion on your online help-FAQ, it does not work either.

Thanks,
Sean Drun
0
Peter
Telerik team
answered on 24 Oct 2012, 08:51 AM
Hello Sean,

In order to have the Web ReportViewer display in 100% height, you need to specify height to the whole DOM tree. Check out the updated style:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=6.2.12.1017, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">       
        html, body, form#form1, div#content, center#center
        
            border: 0px solid black;
            padding: 0px;
            margin: 0px;
            height: 100%;
        }
    </style>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //script
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
    </telerik:RadAjaxManager>
    <div id="content">
        <center id="center">
            <telerik:ReportViewer ID="ReportViewer1" runat="server" width="99%" height="99%"/>
        </center>
    </div>
    </form>
</body>
</html>
Regards,
Peter
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
Hamid
Top achievements
Rank 1
answered on 01 May 2013, 08:29 PM
Hi
I have been trying out the sample WebTRDXDemo - I am bit unclear about the Path of the report saved,

e.g. if I move the 'Barcodes Report.trdx' to a 'Reports' Folder and change the codebehind as 

reportSource.Uri = "Reports/Barcodes Report.trdx";

it doesn't work, it is still looking for the report at the original place. 

where is the 'base path' configured?

Thanks
Hamid
0
Peter
Telerik team
answered on 02 May 2013, 02:16 PM
Hi,

Check out the following code snippet:

var reportSource = new UriReportSource();
reportSource.Uri = ".\\Reports\\Dashboard.trdx";
this.ReportViewer1.ReportSource = reportSource;
Additionally the file properties should be Build action set to Content and Copy to output directory set to Copy if newer.

Regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Hamid
Top achievements
Rank 1
answered on 02 May 2013, 11:06 PM
Thank you very much - working well now

Any samples of Reports with parameters  and subreports please,

How to use QueryString as parameter in Report SqlDataSource ?

How to link ParentReport and Subreport - like on common fields please.

Thanks
Hamid
0
Peter
Telerik team
answered on 06 May 2013, 01:49 PM
Hi Hamid,

How to set report parameter value is elaborated in the UriReportSource Class article and how to relate it to your SqlDataSource is elaborated in the SqlDataSource Wizard and Using Parameters with the SqlDataSource component help articles.

About sample subreport check out the Invoice demo that came with your Telerik Reporting installation.

Kind regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Shekhar
Top achievements
Rank 1
answered on 28 May 2013, 12:33 PM
I have created a report in report designer tool. Now, i want to open this report in WPF application is it possible. Will you please provide some sample code to view report .trdx file in wpf application?
0
Stef
Telerik team
answered on 31 May 2013, 11:18 AM
Hi Shekhar,

You can use an UriReportSource and display your XML report definition in the WPF ReportViewer as illustrated in the code snippet here.

In future please avoid double posting or posting question not related to the main topic discussed in the thread. Thus there is more likely other community members to notice your post and help you.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
Report Designer (standalone)
Asked by
Ed Lance
Top achievements
Rank 1
Answers by
Peter
Telerik team
Ed Lance
Top achievements
Rank 1
Sean Drun
Top achievements
Rank 1
Hamid
Top achievements
Rank 1
Shekhar
Top achievements
Rank 1
Stef
Telerik team
Share this question
or