Telerik Forums
Reporting Forum
6 answers
246 views
Hi,

We were controlling the visibility of report items in the need data source event of the report by setting the visible property on the item like :
textbox1.Visible = false;

But after upgrade to Q3 2012 today, this has stopped working .  But if we do this like below it works.
(this.Items.Find("textbox1", true)[0] as Telerik.Reporting.ReportItem).Visible = true;

Could you tell us as to why the old way wouldn't work anymore.

Thanks,
Sunita
                        
Steve
Telerik team
 answered on 11 Dec 2012
2 answers
201 views
I need to convert some fields to SI Units and some more complicated numeric to string formatting. The format builder doesn't allow for this, and I have an existing class in a different assembly that I use for this that I know already works. How can I use this formatting function that I already have to format a number to a string?

Alright, I was able to execute my custom formatting function by added a static method in my report which uses it. Then the static function in the report shows up under the MISC items in the expression builder. 

How else can I add custom functions to the expression builder? Can I do it globally? Or do I have to create custom wrappers on each and every report?
Steve
Telerik team
 answered on 11 Dec 2012
2 answers
103 views
I've read through multiple posts complaining about CSV format, but here I am regardless. The CSV exporting function does not properly export the headers of my list.

If I export the report as a PDF or any other format I'll get the header to say "Timestamp".

As a CSV file, it will say "timeStampDataTextBox" Which is obviously not what I, or ANYONE, would want.

I don't care if it is a human readable format or not, the data represented in that field is "Timestamp" not a text box. I still need the headers in my export, so turning them off completely is not useful. What I need, is to be able to format the header's text so that is appropriate.

How come by labelsGroupHeader text box values are not even displayed? How come you decide to instead use the text boxes programmatic name of the fields values instead?

From what I've seen the standard response to complaints regarding the uselessness of CSV export is met with responses claiming that they are doing it wrong and don't address the real problems people are having.
Steve
Telerik team
 answered on 11 Dec 2012
11 answers
342 views
Good Afternoon,

I am using implicit styling (not using style manager) in my current project and can't seem to be able to style the WPF report viewer with the Windows8 theme. I tried to add the resource dictionaries from the Themes.Implict Windows8 folder (ReportViewer.xaml, ReportViewerDialogBox.xaml, ReportViewerErrorStatus.xaml) without success. The resource dictionaries refer to the Silverlight report viewer and there are other references missing.

Could you please let me know how to achieve Windows8 styling for the WPF report viewer using implicit styles?

Thanks,

Mike
Mike
Top achievements
Rank 1
 answered on 11 Dec 2012
5 answers
388 views
Hi,

I try to replicate our invoices in Telerik Report but I've got some problems with Header and Footer.

I'm searching in forum but I don't find a solution for my problem, afraid there's not.

Here's my problem :our invoice can have several pages. The header and footer of the first page are different from those to the next pages.

For the header, I think I've found a solution using ReportHeaderSection for the first page and PageHeaderSection with PrintOnFirstPage property to false. But for the footer, no solution, please help me. 

I would really want to use telerik product for my company (because they are the best ;), so I need a solution.

Thanks for your help.
Steve
Telerik team
 answered on 11 Dec 2012
2 answers
150 views
The Master-Detail using Subreports documentation makes sense when your data is coming from a database, but not when you are using an ObjectDataSource and you want your subreport to be bound to a collection property on that object.

I got this working but was looking for some feedback as to if I'm doing this the hard way and also as a reference as the docs seem lacking in this area.


readonly System.Xml.XmlReaderSettings _settings = new System.Xml.XmlReaderSettings { IgnoreWhitespace = true };
 
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        Telerik.Reporting.Report report;
        using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(@"Report.trdx", _settings))
        {
            var xmlSerializer = new ReportXmlSerializer();
            report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
        }
        report.DataSource = GetDataSource(); //List<ParentObject>
        var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
 
        var instanceReportSource = new InstanceReportSource { ReportDocument = report };
        report.Items["detail"].ItemDataBinding += ReportOnItemDataBinding;
 
        ...
 
    }
}
 
private void ReportOnItemDataBinding(object sender, EventArgs eventArgs)
{
    var detailSection = sender as Telerik.Reporting.Processing.DetailSection;
 
    using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(@"SubReport.trdx", _settings))
    {
        var xmlSerializer = new ReportXmlSerializer();
        var subReport = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
        subReport.DataSource = ((ParentObject)detailSection.DataObject.RawData).Children;
        var sr = (SubReport)detailSection.ItemDefinition.Items["subReport1"];
        sr.ReportSource = new InstanceReportSource {ReportDocument = subReport};
    }
}
Rip
Top achievements
Rank 1
 answered on 11 Dec 2012
1 answer
125 views
Hi all,

IS there any way for the report to persist it's report generation timestamp on the date it was first printed?

I've tried this:  http://www.telerik.com/community/forums/reporting/telerik-reporting/show-current-date-time-on-report-header.aspx but the date will change each time you open up the report again. thanks in advance 
Steve
Telerik team
 answered on 10 Dec 2012
0 answers
82 views

 

In the Sales by product line per period the demo show how the columns and the rows can be expanded and collapsed, but I don't see a way to do this? I cannot find this information in the documentation? How is this accomplished?

Eric Klein
Top achievements
Rank 1
 asked on 10 Dec 2012
2 answers
133 views
Here is the exact error that is reported when telerik and the session state are configured(it's attached as image file).  When using telerik reporting tool..I'm using sql datasouces to get values and here is the all code that I used..I used designer part to create the report  page..
namespace TelerikReporting
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Configuration;
    using System.Data.SqlClient;
    using DataService.ConnectionFactory;
 
    public partial class PropRep : Telerik.Reporting.Report
    {
        public PropRep(int ID)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            this.ReportParameters["ID"].Value = ID;
            PropTest.Parameters["@ID"].Value = ID;
            PropTest.ConnectionString = ConnectionFactory.GetConnectionString(ConnectionType.SQLConnection);
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
    }
}

This is code for aspx page which has Report Viewer
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server"></telerik:ReportViewer>
    </div>
    </form>
</body>
</html>

and this is the aspx.cs codebehind part of the page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class Reporting_Report : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["PID"] != null)
            {
                int ID = Convert.ToInt32(Request.QueryString["PID"].ToString());
                Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
                instanceReportSource.ReportDocument = new TelerikReporting.PropRep(ID);
                this.ReportViewer1.ReportSource = instanceReportSource;
            }
  
        }
    }
}
Peter
Telerik team
 answered on 10 Dec 2012
1 answer
68 views
Hi,

I have a report that is currently using a SQL Data Source for its data, which is working fine. However, my program uses this same SQL query in various classes. This means that the same query is being stored in the sqlDataSource component within my Telerik report, as well as in my SQL.cs file, which contains all queries used within my C#.

Is there a way of getting my Telerik report to get the SQL for its data source from the SQL.cs file, rather than having to duplicate this SQL code?

Thanks,
Ashley
Ashley
Top achievements
Rank 1
 answered on 10 Dec 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?