Telerik Forums
Reporting Forum
1 answer
155 views
I recently upgraded to 2008 Q3 of telerik reporting and a new problem has arisen with my reports.

I have several Reports with Sub Reports.
Each sub report has a group header.
When I preview the report, the group header(s) of the sub reports are appearing twice.
If i export to PDF, TIFF, Excel, or any other format then the report is rendered correctly.

Any ideas?

I've been trying for 3 days to solve this with no luck.  Couldn't find anything on the forum about this either.

Here is the code for my Master Report.
This is a very simple report that serves as a standardized report header and footer with a SubReport in the details section.

Partial Public Class MasterReport 
    Inherits Report 
    Public Sub New() 
        InitializeComponent() 
    End Sub 
 
    Dim _ReportCriteria As IA.Reporting.ReportCriteria 
 
    'Public Sub New(ByVal subReport As ReportBase, ByVal criteria As ReportCriteria) 
    Public Sub New(ByVal subReport As IReport, ByVal criteria As ReportCriteria) 
        InitializeComponent() 
 
        'Init the DataSource 
        Dim oneRec As New GenericCollection(Of String
        oneRec.Add("one"
        Me.DataSource = oneRec 
 
        'Set the Sub Report Type 
        Me.SubReport1.ReportSource = subReport 
 
        Me.PictureBox1.Value = ReportRenderTools.ImageTools.IAHeaderImage 
        Me.reportNameTextBox.Value = subReport.ReportTitle 
        _ReportCriteria = criteria 
    End Sub 
 
    Private Sub SubReport1_NeedDataSource(ByVal sender As ObjectByVal e As System.EventArgs) Handles SubReport1.NeedDataSource 
        Dim subReport As Telerik.Reporting.Processing.SubReport = TryCast(sender, Telerik.Reporting.Processing.SubReport) 
        If Not subReport Is Nothing Then 
            Dim IRep As IReport = TryCast(subReport.InnerReport.ItemDefinition, IReport) 
            IRep.SetReportHeader(_ReportCriteria) 
            Dim data As Object = IRep.CreateDataSource(_ReportCriteria) 
            If data.Count = 0I Then 
                subReport.InnerReport.DataSource = Nothing 
            Else 
                subReport.InnerReport.DataSource = data 
            End If 
        End If 
    End Sub 
End Class 

Steve
Telerik team
 answered on 08 Dec 2008
1 answer
156 views
I tried to upload the code example attached to this email to your code site, but it wouldn't accept the submission.

I'm trying to get my 10,000 points!

I found it almost impossible to find in the documentation "how to" bind a List<T> dataset to a report and also simultaneously update the Chart bar series with the current row of data.

I finally worked out how to do it, and I thought the example would be useful to your users (especially a novice like me) and it would be really useful to add it to the "getting  started" guide, I think.

Simply unzip the file to a folder and open in VS2008.  Build the solution then switch to "Preview".

Once you know how to get the current datarow values the report is processing, the ret is easy, but I didn't see anything about "viewDataRow" in the document,  hence my problem.

Hope this helps someone else.  Please let me know.

Barry
Steve
Telerik team
 answered on 05 Dec 2008
2 answers
147 views
In win forms I have a report selector form and a report viewer form. I populate the report selector list from a database. This lets me add new reports without changing the code in either form. However, I cannot figure out how to call the user selected report generically. What I can do is to hard code the selection options in the viewer using a case statement:

        Select Case param 'param is a String of the user's selection passed from the calling form
            Case "Report1"
                Me.ReportViewer1.Report = New MyClassLib.Report1
            Case "Report2"
                Me.ReportViewer1.Report = New MyClassLib.Report2
        End Select

To make it more generic I want to use the passed parameter to specify the report. Something like this:

    Me.ReportViewer1.Report = New MyClassLib.param

Any suggestions as to how to accomplish this?

Thanks, Matthew
Matthew Hile
Top achievements
Rank 1
 answered on 05 Dec 2008
3 answers
166 views
Hi,
I am trying to make a report that has a sub reports.
I have a business object Task as an IList<Task> with a collection TaskDates.

Now, I want all the TaskDates to show as a sub report of Task but I don't understand how to generate the dates.
I have tried this (don't know if it is the "best practice" way):
private void subReport1_NeedDataSource(object sender, System.EventArgs e) 
        { 
            Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender; 
 
            Task task = (Task)(subReport.DataItem); 
 
            subReport.InnerReport.DataSource = task.TaskDates; 
        } 
This is the sub report TaskDates event but it generates:
Unable to cast object of type 'System.Data.DataRowView' to type 'PPS.DO.Task'.

Am I on the right track here or is it completely wrong! :)

OT:
When you are making sample projects of your products it would be super if you could make some of them with business objects and not only "object datasource" like examples made in design page.

Steve
Telerik team
 answered on 05 Dec 2008
1 answer
61 views

This is probably more of a support ticket situation, but until we get our client.net accounts straightened out with the right license info, maybe I can get a hand from the forums...

Having installed version 2008.3 1105 of Telerik Reporting, an existing project built with version Q2 2008 SP2 is now broken.

We were binding subreports to object collections on the parent report’s data item, like so:

 

        private void SubReport1_NeedDataSource(object sender, System.EventArgs e)

        {

            var subReport = ((Telerik.Reporting.Processing.SubReport)sender);

            subReport.InnerReport.DataSource = ((System.Data.DataRowView)subReport.Parent.DataItem).Row["OrderDetails"];

        }

 

The yellow item (parent of a Processing.Subreport) was of type Processing.ReportItemBase in Q2 2008 SP2.  In 2008.3 1105, the type has changed to Processing.ProcessingElement, which does not have a DataItem property.

Any suggestions?

Steve
Telerik team
 answered on 03 Dec 2008
1 answer
87 views
Is it possible to "render" a report out to a file or something and then import it back into the report viewer so that people can export it out to different formats at a later time without having ot rerun the report?

Thanks,
Adam
Steve
Telerik team
 answered on 03 Dec 2008
1 answer
259 views
hello all ,
i am using telerik Reporting service ..

i get panel from itemdatabound handler and i want to add dynamically textbox how can i do this ????

here is the MyPanel_ItemDataBound handller code
      void MyPanel_ItemDataBound(object sender, EventArgs e)
        {
                Processing.ReportItemBase itemBase = (sender as Processing.ReportItemBase).Parent;
                Processing.DetailSection section = (itemBase as Processing.DetailSection);
                Processing.ReportItemBase[] NetPanels = (Processing.ReportItemBase[])section.Items.Find("NetPanel", false);
                if (NetPanels.Length > 0)
                {
                Processing.Panel MyPanel = NetPanels[0] as Processing.Panel;
                Telerik.Reporting.TextBox labelCaption = new Telerik.Reporting.TextBox();
                labelCaption.Name = nestedData.Month.ToString() + "_" + EmployeeID.ToString();
                labelCaption.Value = nestedData.Month.ToString();
                labelCaption.Size = new SizeU(new Unit(40), new Unit(40));
                labelCaption.Location = new PointU(ChildLocation, new Unit(10));
                labelCaption.Style.BorderWidth.Bottom = new Unit(10, UnitType.Pixel);
                labelCaption.Style.BorderWidth.Top = new Unit(10, UnitType.Pixel);
                labelCaption.Style.BorderWidth.Right = new Unit(10, UnitType.Pixel);
                labelCaption.Style.BorderWidth.Left = new Unit(10, UnitType.Pixel);
                labelCaption.Style.BackgroundColor = Color.Black;
                labelCaption.Style.Color = Color.White;
                MyPanel,Items.Add(labelCaption); // compilation error here
"Error    103    Argument '1': cannot convert from     'Telerik.Reporting.TextBox' to 'Telerik.Reporting.Processing.ReportItemBase' "
            }
    }
Steve
Telerik team
 answered on 02 Dec 2008
4 answers
344 views
With Q2 2008, I have a report which displays a series of invoices. claims, whatever.  Each new invoice begins a new group on a new page.  An individual invoice can go on for several pages.  After the header info, columns of figures are printed out.  These usually a start about 2/3 of the way down the page, so the column headers are printed at the bottom of the group header.

For the subsequent pages, though, I also need column headers, and am trying to use the page header for this.  The problem is that it prints at the top of every page, even where there is a new group.

How can I suppress the page header when the group is a new one?

Thanks
Mike Thomas
Mike
Top achievements
Rank 1
 answered on 27 Nov 2008
3 answers
211 views
Hello Telerik:

I am working with telerik Report and I have created several reports. Well i would like to export in xml one of them in order to be used for another applications.

I have read in the features of the component that can be done, but  I don't find where this documentation is .

Can you advise me ?


Any help would be appreciate.
Thank you. Pablo.
Steve
Telerik team
 answered on 26 Nov 2008
1 answer
207 views
With VS 2008 and maybe in VS 2005 using the Microsofts reporting tools (Reportviewer, RDLC) you have the option to toggle the visibility of a control based on action taken on another control.  For example I can have a lable that represents "collapse" or "Expand" when user clicks on that label you can wire it up to toggle the visibility of another control such as a subreport.  Telerik support this functionality?
Steve
Telerik team
 answered on 26 Nov 2008
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?