Telerik Forums
Reporting Forum
2 answers
169 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
181 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
73 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
100 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
290 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
382 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
234 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
221 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
3 answers
414 views
Dear all ,

Can any one help me plz , Ineed to display Crystal report In telerik report viewer
.

Steve
Telerik team
 answered on 26 Nov 2008
7 answers
230 views
iam Using the Telerik Windows report But I Had a Problem When I Using It  , The Problem is Disturbing and It is : -
Delayed the loading of the report in the Windows Application .
How i Can Solve It ?
Please help me quickly ...
Steve
Telerik team
 answered on 25 Nov 2008
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?