Telerik Forums
Reporting Forum
3 answers
149 views
Is there a way to write a custom rendering extension for Telerik Reporting?
Stef
Telerik team
 answered on 08 Aug 2014
1 answer
125 views
hi
i have a column which indicate as my date time data.
and i have two report parameter which work as start date and
End date.i want set my start date as minimum date in which stored in datetime column
and if no data stored be today date time
Thanks for wonderful suppor
Hinata
Top achievements
Rank 1
 answered on 07 Aug 2014
1 answer
308 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
77 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
409 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
252 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
453 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
73 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
332 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
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?