Telerik Forums
Reporting Forum
1 answer
92 views
Hi

  1. Can you give any sample report using multiple(3 or 4 ) parameters,
  2.  want see all the results by default without selection of any paramter.
  3. every parameter should work like individually.

here i am facing problem with two paramters.

I have create two parameters one is role and object.
Role parameter with  allow null=true, data Source ,dispaly member="rolename",value member="RoleID"
Object parameter with allow null=true,data Source ,dispaly member="objectname",value member="ObjectID"

placed condition in filter in report property window as
=fields.roleid==parameter.roleid and =fields.objectid==parameter.objectid
Object paramter is working but role parameter is not working.

plz can u clarify this one.

thx

Steve
Telerik team
 answered on 09 Dec 2008
1 answer
55 views
Hi
 
Here we have struggling with customized reports with  search criteria.
we need to bind stored procedures to report with search criteria in cs file.
we can do design in report , data as to bind from aspx page.
how can we customize report from aspx page and search criteria.
can plz give me any suggetions..

thx advance
Steve
Telerik team
 answered on 09 Dec 2008
1 answer
329 views
I want to hide/show a Group Header at runtime depending on the value of a boolean variable. For example I want to give a choice to my user whether he wants to see each new group starting on a new page.

Do you a sample code that I can use to achieve this.

Tariq Changgez
Steve
Telerik team
 answered on 08 Dec 2008
1 answer
145 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
131 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
132 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
157 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
57 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
66 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
238 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
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?