Telerik Forums
Reporting Forum
1 answer
301 views
Hi 

I would like to know if it is possible for me to hide the print button when a person views a report.
As i have been having issues with the browser/print functionality i would like to hide the print button and just allow them to export to CSV and PDF is this possible?
Stef
Telerik team
 answered on 07 Aug 2014
1 answer
75 views
I'm trying to modify the control template for the ReportViewer using Blend. When I choose Edit Template > Edit a Copy, it creates a blank ControlTemplate instead of a copy of the ReportViewer's default template:

<UserControl.Resources>
  <ControlTemplate x:Key="ReportViewerControlTemplate1" TargetType="rv:ReportViewer"/>
</UserControl.Resources>
 
<Grid x:Name="LayoutRoot" Background="White">
  <rv:ReportViewer Template="{StaticResource ReportViewerControlTemplate1}" />
</Grid>

I'm using Telerik RadControls for SIlverlight Q3 2013, Telerik Reporting Q3 2013, Expression Blend 4. Does the ReportViewer have some other dependency that's preventing this from working?
Stef
Telerik team
 answered on 07 Aug 2014
3 answers
384 views
Hi,

I've a WPF application that use Reporting to display data. The application use web services to connect to the server and underlying database. Report are designed using visual studio and ObjectDataSources. Now I need to give users the ability to design report using the telerik standalone designer.

Using the procedure described here I can expose my business data to users; the question is: how can I display the preview data? The designer will run on the client machine that have no access to database (the data access is done by Web Service on the server).

Furthermore, is there a way to intercept save command on the designer to save report directly on the database instead of on the local file system?

Thanks in advance for any kind of help
Stef
Telerik team
 answered on 06 Aug 2014
1 answer
241 views
So I'm new to Telerik, and have been struggling getting a NeedDataSource event to fire in an ASP .NET web application with the latest version of Reporting, Q2 2014 (8.1.14.618).  Interestingly, the code I'm about to post works fine in the much older version (3.1.9.701) and I'm at a loss as to what has changed and why the code that used to work is broken now.  

So in our aspx page we have a simple ReportViewer Control

<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" style="margin: 0px;">
    <form id="form1" runat="server">
        <div style="height: 100%;">
            <telerik:ReportViewer ID="ReportViewer1" runat="server" width="100%" height="100%">
            </telerik:ReportViewer>
        </div>
    </form>
</body>


The code behind file goes and gets data when the page loads:
01.protected void Page_Load(object sender, EventArgs e)
02.{
03.    if (!IsPostBack)
04.    {
05.        LoadData();
06.    }
07.}
08. 
09.private void LoadData()
10.{
11.    Page.Title = "Report Title";
12. 
13.    ReportBook reportBook = new ReportBook();
14. 
15.    CustomReport1 report = new CustomReport1();
16.    CustomReport2 report2 = new CustomReport2();
17.    CustomReportData data = new CustomReportData(_Id);
18.    report.DataSource = data;
19.    report2.DataSource = data;
20. 
21.    reportBook.Reports.Add(report);
22.    reportBook.Reports.Add(report2);
23. 
24.    this.ReportViewer1.Report = reportBook;
25.}


And then the code generated from the designer looks like this, CustomReport1.cs:
01.public partial class CustomReport : Telerik.Reporting.Report
02.{
03.    public CustomReport()
04.    {
05.        /// <summary>
06.        /// Required for telerik Reporting designer support
07.        /// </summary>
08.        InitializeComponent();
09. 
10.        //create event that will set the data source for the table
11.        tbl.NeedDataSource += new EventHandler(tbl_NeedDataSource);
12.    }
13. 
14.    /// <summary>
15.    /// Handles the NeedDataSource event of the tbl control.
16.    /// </summary>
17.    /// <param name="sender">The source of the event.</param>
18.    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
19.    void tbl_NeedDataSource(object sender, EventArgs e)
20.    {
21.        //In order to programmatically set the table, we need to use the processing table
22.        Telerik.Reporting.Processing.Table table = ((Telerik.Reporting.Processing.Table)sender);
23. 
24.        //set the data source of the table
25.        table.DataSource = ((CustomReportData)table.Report.DataSource).CustomCollection;
26.    }
27.

For line 25, CustomCollection is just a list of BLL objects.  The craziest thing for me is that when I run with the old version I can hit breakpoints inside tbl_NeedDataSource function.  However, with the new Telerik controls I am unable to hit anything in the tbl_NeedDataSource function.  I'm wondering what may have gotten lost in translation to the newer controls, maybe there's some kind of mechanism that became obsolete between those two versions that would cause the "wiring" not to work.  Or maybe there's just a better way to do this now :)  Any thoughts or suggestions would be helpful.  Thanks in advance!
Stef
Telerik team
 answered on 06 Aug 2014
4 answers
440 views

 I am using the needdatasource event on the subreport to get data:

      

 Private Sub TimesheetParityBreakdownReport_NeedDataSource(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.NeedDataSource
       
        Dim item As Telerik.Reporting.Processing.ReportItemBase = TryCast(sender, Telerik.Reporting.Processing.ReportItemBase)
        Dim dataRow As DataRow = DirectCast(item.DataObject.RawData.row, DataRow)
        Dim oDataSource As New System.Web.UI.WebControls.ObjectDataSource

        oDataSource.SelectMethod = "SafeTelerikReportNewTimesheetParityBreakdown"
        oDataSource.TypeName = "SafeTelerikReportWS.SafeTelerikReportService"
        Dim session As Guid
        session = dataRow("SessionID")

        oDataSource.SelectParameters.Add("SessionID", session.ToString)
        oDataSource.SelectParameters.Add("DivisionRef", dataRow("DivisionRef"))
        oDataSource.SelectParameters.Add("DepartmentRef", dataRow("DepartmentRef"))
        oDataSource.SelectParameters.Add("ToDate", dataRow("ToDate"))
        oDataSource.SelectParameters.Add("NoOfWeeks", dataRow("NoOfWeeks"))
        oDataSource.SelectParameters.Add("PersonnelRef", dataRow("PersonnelRef"))
        oDataSource.SelectParameters.Add("ClientRef", dataRow("ClientRef"))
        oDataSource.SelectParameters.Add("JobDescription", dataRow("JobTitle"))

        oDataSource.Select()
        oDataSource.DataBind()
        Me.DataSource = oDataSource
    End Sub

   the parameters are being passed to the subreport are stuck on the first row data values from the mainreport.

   ie I have a 100 different rows in the main report and the subreport comes out eveytime based on rows 1 values.
i need each subreport to be based on the each detail items of the main report

     

   I also need to know how to run the subreport ondemand, so that it automatically doesnt call the subreport 100 times for example.

   I have various field on the main report which i can use to show subreport. I'd like it so when i click to open one subreport, any open ones should close.

  
using Q2 2010 reporting

 Thanks

Stef
Telerik team
 answered on 06 Aug 2014
2 answers
67 views
When I export my report to pdf, the details section is going out of the bounds of the report.

When I look at the report in the preview, it looks perfect, but the pdf is expanding out the details section past the rest of the sections.

(see attached images for preview vs. pdf)
Stef
Telerik team
 answered on 06 Aug 2014
1 answer
1.2K+ views
I am getting blank pages when exporting to PDF. I have already followed the steps in the outdated 7 year old KB article: http://www.telerik.com/support/kb/reporting/details/problem-telerik-reporting-renders-blank-pages with no success. My report is only 6.5 inches wide and is wrapping the text as expected to keep in within the 6.5 inches. It prints fine except for the extra blank pages. My Report consists of a master report with a subreport.

I am not sure what can be done to fix this. The blank pages are happending after the end of the sub-report. I tried setting the backgrounds to diff colors and it seemsthat the master report detail is whats showing up as the background.  I have attached a copy of an export to pdf, i have also attached a screen shot of my report designer for the detail and header:




Stef
Telerik team
 answered on 06 Aug 2014
2 answers
323 views
Hello,

I am new to telerik and using telerik report designer (standalone) v8.1.14.804 
When i try to connect to MySql using the connection string: Server=localhost;Database=dbname;Uid=username;Pwd=pass;
i get this error:
Failed to find or load the registered .net framework data provider.

Please note that i have installed mysql .net connector.

Please advise.
Regards.
Farah
Top achievements
Rank 1
 answered on 06 Aug 2014
1 answer
279 views
Hello

We are trying to create a report that contains a PCL escape sequence for a HP printer to read and then generate a 2D barcode using the Barcodejet software installed on the printer.

<esc>27(s0p0v20,0b24830TBARCODE.<esc>

Is it possible to insert the PCL escape sequence into a Telerik report and if so what is the escape character that should be used to represent the start of the escape sequence?

Thanks in advance

Joel
Nasko
Telerik team
 answered on 06 Aug 2014
3 answers
150 views
Report Designer stopped working after adding 2 db fields.
Can neither Preview Data in Existing Reports, or Design New Reports,  

Fortuneately Production still works.
  I did clean build, add-migration & update-database successfully, clean build;
  Copied (2) project dll's from Bin to ReportDesigner folder (overwrote last ones).
  EntityFramework.dll already there - unchanged.
  Telerik.ReportDesigner.exe.config - left unchanged

I even hand added (into .trdx text file) one of the new entity class fields to appear in an existing trdx report, it worked in production.
  At a standstill with Telerik Report Designer

Preview Data gets msg - Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.  On ALL Existing reports, same msg.

Incidentally, Telerik.Reporting & Telerik.Reporting.Services.WebApi are Q3 2013 7.2.13.1016
Have from Jan 2013-2014 DevCraft Ultimate Bundle - [I know, need to resubscribe]

Have learned a ton following many Telerik Documentation, Tutorial & Blog posts.

Using VSO to checkin & autobuild into Azure-Web (with Azure-SQL [dev & prod db same right now, I know not good, but helps in this issue])
Running Visual Studio 2012.  MVC5, EF5. - [I know, need to upgrade]

Tried attaching VS Debugger to Telerik.ReportDesigner.exe process - couldn't get it to trap error when Designer displays it.
Tried Assembly Binding Log Viewer, wouldn't show anything.
Tried on a second workstation - same issue.... - havent tried a new workstation from scratch.
How can we trap that error.

Editing existing reports, the New fields do show up in Data Explorer ok.  E.g. fPhone1, fPhone2;
  however, click preview, get error

2nd Problem, Try to Create New Report, when choosing context, dropdown never gets populated, stays blank?
looked @ both AppData\..\Telerik..\user.config & Telerik.ReportDesigner.exe.config for anything out the ordinary.  Seemed ok.

Is there another way we can trap the error better
Best
-Jason
Stef
Telerik team
 answered on 05 Aug 2014
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?