Telerik Forums
Reporting Forum
7 answers
313 views
Hi,

in Q2 2010 Telerik Reporting I set the DataSource of a Report to null in the constructor and created dynamically sized textfields dynamically, dependent on some ReportParameter sent by a Silverlight Application via the Telerik WCF Service, in the overridden OnNeedDataSource method.. This worked like a charm.

In Q3 2010 Telerik Reporting the constructor of the Report also gets called twice like before. Once while requesting the report initially to be previewed in the Silverlight Report Viewer, the second time if exporting the Report to PDF or any other format from the Menu of the Silverlight Report Viewer. The first time the constructor is called, OnNeedDataSource gets called correctly and the dynamic Textfields get created, the second time the constructor is called (before saving to file), OnNeedDataSource does not get called, even though the DataSource is again set to null in the constructor.

In Short: Preview shows correct Report like in Q2. Saving to PDF (or any other format) produces blank file in Q3. In Q2 the Report was being saved correctly.

Since this is a time-critical issue, I am temporarily stepping back to Q2 2010 as of now. I hope this issue can be resolved.

Some code reconstructed to visualize what I wrote in the upper paragraphs:

Constructor:

/// <summary>
        ///   Initializes a new instance of the <see cref = "OverviewReportBase{T}" /> class.
        /// </summary>
        public OverviewReportBase()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
 
            // Set DataSource to null, so that the NeedDataSource Event gets fired.
            // This is done because otherwise the ReportParameters are not getting filled from the Silverlight Client.
            DataSource = null;
        }
OnNeedDataSource method:
/// <summary>
        ///   Called when the report needs a data source.
        /// </summary>
        /// <param name = "sender">The sender.</param>
        /// <param name = "e">The <see cref = "System.EventArgs" /> instance containing the event data.</param>
        protected override void OnNeedDataSource(Object sender, EventArgs e)
        {
            Unit writeableArea = CalculateWidthOfWriteableArea();
            IEnumerable<String> columnNames = ((Object[]) ReportParameters["columnNames"].Value).OfType<String>();
            Int32 columnCount = columnNames.Count();
            IEnumerable<Int32> columnPercentages =
                ((Object[]) ReportParameters["columnPercentages"].Value).Select(x => Int32.Parse(x.ToString()));
            Double summedUpWidth = 0D;
            for (Int32 i = 0; i < columnCount; i++)
            {
                Unit controlWidth = writeableArea.Multiply(columnPercentages.ElementAt(i)).Divide(100);
                TextBox captionTextBox = new TextBox
                                             {
                                                 Location =
                                                     new PointU(new Unit(summedUpWidth, UnitType.Mm),
                                                                new Unit(0, UnitType.Cm)),
                                                 Size = new SizeU(controlWidth, new Unit(0.75, UnitType.Cm)),
                                                 Name =
                                                     String.Format(CultureInfo.InvariantCulture, "captionTextBox{0}", i),
                                                 StyleName = "Caption",
                                                 TextWrap = false,
                                                 Value = RetrieveDisplayName(columnNames.ElementAt(i))
                                             };
                labelsGroupHeader.Items.Add(captionTextBox);
                TextBox dataTextBox = new TextBox
                                          {
                                              Location =
                                                  new PointU(new Unit(summedUpWidth, UnitType.Mm),
                                                             new Unit(0, UnitType.Cm)),
                                              Size = new SizeU(controlWidth, new Unit(0.75, UnitType.Cm)),
                                              Name = String.Format(CultureInfo.InvariantCulture, "dataTextBox{0}", i),
                                              StyleName = "Data",
                                              TextWrap = false,
                                              Value = RetrieveValuePathOfColumn(columnNames.ElementAt(i))
                                          };
                detail.Items.Add(dataTextBox);
                summedUpWidth += controlWidth.Value;
            }
            SetDataSourceHere();
            base.OnNeedDataSource(sender, e);
        }
Best Regards
Tomas
Top achievements
Rank 1
 answered on 13 Dec 2010
1 answer
200 views
Can someone tell me what Telerik runtime assemblies I would need to distribute with my application to support Telerik reporting 2010-Q3 edition?

My concern is this. We are using 2009-Q3 Telerik Premium as our UI platform toolset. We have no plans to upgrade. We'd like to start using the 2010-Q3 version of the Telerik reporting components. Can 2009-Q3 UI assemblies co-exist with 2010-Q3 Telerik reporting runtime assemblies?

Peter
Telerik team
 answered on 13 Dec 2010
3 answers
271 views
Hi, Telerik!
    I would be indebted to you, if you help me to explain me how to pass parameters from silverlight application to report viewer. it's uregent! please! 
Steve
Telerik team
 answered on 10 Dec 2010
1 answer
130 views
Hi Terlik ,

I have asked many question in this forum and telerik has solved .

But now i have stuck up with grouping in reporting.

I am not able to understand how to group in report.

I have used my query to get the data everthing works as excepted.

Now i want to group by patient name in report and display to the user.

Can u refer an way how to do grouping.

I have tired all the telerik links but none helped me .

Kinldy provide a good link so that i can understand how grouping works in reports.

It is an SOS situation for me ,please Help.

Thanks
Steve
Telerik team
 answered on 10 Dec 2010
1 answer
85 views
Hello,

First of all great job for Telerik Reporting!

I am having trouble passing throw ObjectSource an Object that contains a Order with a IList<OrderDetails> like this :

 public Order.OrderMetaData cmd { get; set; }
        public IList<OrderDetail.OrderDetailMetaData> ligneCmd { get; set; }
 public Order.OrderMetaData cmd { get; set; }
        public IList<OrderDetail.OrderDetailMetaData> ligneCmd { get; set; }
public Order.OrderMetaData cmd { get; set; }
public IList<OrderDetail.OrderDetailMetaData> ligneCmd { get; set; }

The result is that I have access to the cmd Fields but i didnt find the way to display the details. At the end i would like to report Order with there details...

I ve post what i have in output.
Steve
Telerik team
 answered on 10 Dec 2010
4 answers
184 views

I have a report with three subreports.  The FilesAttached subreport is working, but the other two subreports do not show any data.  Here is my binding code.  Is there something I am missing?  Where else should I look?

Dim summaryReport As New telSummaryReport
summaryReport.DataSource = DS.Tables("SCR")
summaryReport.subNotes.ReportSource.DataSource = DS.Tables("Notes")
summaryReport.subFilesAttached.ReportSource.DataSource = DS.Tables("Files")
summaryReport.subCCB.ReportSource.DataSource = DS.Tables("Decisions")
  
Dim reportProcessor As Telerik.Reporting.Processing.ReportProcessor = New Telerik.Reporting.Processing.ReportProcessor()
Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", summaryReport, Nothing)
  
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ContentType = result.MimeType
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Private)
HttpContext.Current.Response.Expires = -1
HttpContext.Current.Response.Buffer = True
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", filename))
HttpContext.Current.Response.BinaryWrite(result.DocumentBytes)
HttpContext.Current.Response.End()
Eric
Top achievements
Rank 1
 answered on 10 Dec 2010
0 answers
115 views
We are working on a project where we will have somewhere over 100 reports that are going to be accessed/viewed via a web application. The reports will be defined in a separate class. The list of reports will change over time, some will be added, some will be removed. We can recompile and redistribute the reports DLL, but I am trying to avoid having to modify and recompile the applicatoin when the reports change.

What I'd like to do is to somehow automate the list of reports, display a list of reports to the user, with the ability to click and see any of the individual reports. The easiest thing would be is if there was some kind of FOR EACH iteration that I could do to populate a menu or treeview. Alternatively I've looked at storing the report list in a database table and using that for the selection. I would then like to have a single form that includes a reportviewer, and populate/configure the reportviewer when an item is selected.

The Telerik Reporting web demo is something like the interface I'm looking for, with a list of reports and a reusable page section, but I don't think it's dynamic, and it appears to use different ASPX files ror each report -- which I'd like to avoid.

Anyone have any suggestions about the best way to go about this, or better yet an example?
Derek
Top achievements
Rank 1
 asked on 10 Dec 2010
0 answers
192 views
hi there,
i am consuming the telerik reporting in an ASP .NET MVC. Earlier i was showing a static image in the report.Now i want to show it dynamically. This image is located in the location "/Content/images/ReportImages" of ASP .NET MVC project.

in the asp .net mvc i have some(the view ) thing like this
<body>
  <div style="width: 700px; margin-left: auto; margin-right: auto;">
    <a href='/Patients/Show/<%= ViewData["PatientId"] %>' class="button">Current User</a><br />
    <br />
 
    <script runat="server">                      
      //protected override void OnPreRender(EventArgs e) {
      //  ReportViewer1.Report = new Report1();
      //  base.OnPreRender(e);
      //}
 
 
      public override void VerifyRenderingInServerForm(Control control) {
        // to avoid the server form (<form runat="server">) requirement
      }
 
      protected override void OnLoad(EventArgs e) {
        base.OnLoad(e);
 
        // bind the report viewer
 
        var priliminaryReport = new PatientPriliminaryReport();
        priliminaryReport.ReportParameters["patientId"].Value = ViewData["PatientId"];
        priliminaryReport.ReportParameters["userId"].Value = ViewData["UserId"];
 
        ReportViewer1.Report = priliminaryReport;
 
 
      }
 
    </script>
 
    <form id="Form1" runat="server">
    <telerik:ReportViewer ID="ReportViewer1" runat="server" Height="1100px" Width="700px">
    </telerik:ReportViewer>
    </form>
  </div>
</body>

And Here is the reporting class

namespace Faq.Reports {
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
 
    /// <summary>
    /// Summary description for PatientPriliminaryReport.
    /// </summary>
    public partial class PatientPriliminaryReport : Telerik.Reporting.Report {
        public PatientPriliminaryReport() {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
 
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
 
    }
}

The report contains a "Picture Box" with name "pictureBox1" .


i have already seen some solutions . But as i only aware of MVC frame work . i could not understand the events stuff. so

Can you please help me with this ,keeping my existing code in mind.

Thanks
rafi
Top achievements
Rank 1
 asked on 09 Dec 2010
2 answers
151 views
Hi,

After upgrading Q3 version, i got the following error for reporting. 

An error has occurred while processing Table 'table1':

Group with name 'Group1' already exists. Groups should have unique names.

 

Could someone please help me to attack that problem?

Thanks in advance.

Regards,
NNT
Adam
Top achievements
Rank 1
 answered on 09 Dec 2010
0 answers
103 views
Hi all

I am creating an email application for sending mails, i am stuck in these parts

1. I want to create a report on whether the email is delivered
2. I want to create a report on whether mail is read
3. I want to create a report on if user click on any link


if any 3rd party tool need how to intergrate


Thanks in advance
Vinoth Arun
Top achievements
Rank 2
 asked on 09 Dec 2010
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?