Telerik Forums
Reporting Forum
2 answers
491 views
I'm a bit confused about how to bind my report to a business object.  I've been able to get my object into the 'DataSource' property of my report, but I would think that at this point I'd have to specify the method which is responsible for populating the DataSource.  However, I'm not sure where to specify this method?  My business object is listed below, it is relatively simple and I'm currently just creating some debug objects in a method that will eventually pull from the database:

Imports System  
Imports System.Data  
Imports System.Configuration  
Imports System.Web  
Imports System.Collections  
Imports System.Collections.Generic  
Imports Triton.TCNext.EntityLayer  
 
Public Class TransactionType_BAL  
  Inherits List(Of TransactionType_BAL)  
 
  Sub New(ByVal id As Integer, ByVal name As String, ByVal description As String)  
    Me.ID = id 
    Me.Name = name 
    Me.Description = description 
  End Sub  
 
  Sub New()  
 
  End Sub  
 
  Private _id As Integer = 0 
  Public Property ID()  
    Get  
      Return _id  
    End Get  
    Set(ByVal value)  
      _id = value 
    End Set  
  End Property  
 
  Private _name As String = 0 
  Public Property Name()  
    Get  
      Return _name  
    End Get  
    Set(ByVal value)  
      _name = value 
    End Set  
  End Property  
 
  Private _description As String = 0 
  Public Property Description()  
    Get  
      Return _description  
    End Get  
    Set(ByVal value)  
      _description = value 
    End Set  
  End Property  
 
 
  Public Shared Function GetTransactionTypes() As List(Of TransactionType_BAL)  
    Dim transactionType1 As TransactionType_BAL = New TransactionType_BAL(1, "Checking Withdrawal", String.Empty)  
    Dim transactionType2 As TransactionType_BAL = New TransactionType_BAL(2, "Savings Withdrawal", String.Empty)  
    Dim transactionType3 As TransactionType_BAL = New TransactionType_BAL(3, "Credit Withdrawal", String.Empty)  
    Dim transactionTypes As List(Of TransactionType_BAL) = New List(Of TransactionType_BAL)  
    transactionTypes.Add(transactionType1)  
    transactionTypes.Add(transactionType2)  
    transactionTypes.Add(transactionType3)  
    Return transactionTypes  
  End Function  
 
  Private Shared Function GetTransactionTypeFromTransactionTypeEntity(ByVal transactionType As TransactionTypeEntity) As TransactionType_BAL  
    If transactionType Is Nothing Then  
      Return Nothing  
    Else  
      Return New TransactionType_BAL(transactionType.ID, transactionType.Name, transactionType.Description)  
    End If  
  End Function  
 
 
  Private Shared Function GetTransactionTypeListFromTransactionTypeEntityList(ByVal recordSet As List(Of TransactionTypeEntity)) As List(Of TransactionType_BAL)  
    Dim transactionTypes As List(Of TransactionType_BAL) = New List(Of TransactionType_BAL)  
    Dim record As TransactionTypeEntity  
    For Each record In recordSet  
      transactionTypes.Add(GetTransactionTypeFromTransactionTypeEntity(record))  
    Next  
    Return transactionTypes  
  End Function  
 
 
 
 
End Class  
 

My initial approach was to create a BLL, a DLL, entity objects to pass between the two, then implement stored procedures in the DB.  My thought was that I would have a method in my BLL that would populate a collection of objects then pass this collection to the report for display.  To populate the collection, the BLL would call a method in the DAL which in turn would populate an entity object (or collection of entity objects) based on the data retrieved through the utilization of stored procedures in the database.  The BLL would then convert these entity objects to business objects which could be passed to the report in a strongly-typed collection.

Does this approach seem feasible?  Is this overkill? 
Bhushan
Top achievements
Rank 1
 answered on 20 Sep 2012
4 answers
89 views
Hello,
We are having issues with the Sales Dashboard demo for Telerik Reporting available here: http://demos.telerik.com/reporting/sales-dashboard/demo.aspx - namely, the report itself will not scroll on our iPad 2's. Any attempts to scroll just move the page instead of scrolling the report.
Is this a known issue? Are there any suggested workarounds?
Steve
Telerik team
 answered on 20 Sep 2012
0 answers
99 views
Hi

When I have already opened a file, and I'm trying to save a report with the same name, I get the following message:
The process cannot access the file 'C:\1.pdf' because it is being used by another process.

How do I change this message to others, or may I call my popup?

Silverlight, Q2 2012 build 6.1.12.621
Hans
Top achievements
Rank 1
 asked on 20 Sep 2012
15 answers
399 views
Hi,

Everytime after i open visual studio and open any design (even if it's an xaml file), the toolbox items for telerik are added... by now each icon appears already 4 times.

It's extremely enoying because it hangs visual studio during the time that the icons are added.

In att. you'll find proof.

I'm using Q1 2011, Visual Studio 2010, Win7 Pro 64 bit
Kevin Finck
Top achievements
Rank 1
 answered on 19 Sep 2012
2 answers
435 views
Hi,

i have subreport with datasource containt collection of objects. (So components replicate here). Among other i have panel with 2 tables whitch i want to hide if both tables are empty. Tables is fulfilling by binding datasource: ReportItem.DataObject.nameOfMySubClassCollectionInMainDataSource and its working fine. I try hiding the panel by parameters with conditional formating or manualy in code. But problem is that myTable.DataSource property is always null event in DataBound event. Of course after report starting table contains right data but in code i can't check it. Please help.

here is code, where debuger reports always null value:
private void manPrechodZTable_ItemDataBound(object sender, EventArgs e)
        {
            if ((manPrechodZTable.DataSource == null || (manPrechodZTable.DataSource as ExC_BodTrasy.ExC_Prechod[]).Length == 0))
            {
                this.ReportParameters[1].Value = true;
            }
            else
            {
                this.ReportParameters[1].Value = false;
            }
        }


Thanks,

Tomas Linhart, CZ
Peter
Telerik team
 answered on 19 Sep 2012
4 answers
108 views
Hi!

I have built a very simple report: in the constructor of the report a textbox is added to the detail section showing the actual date and time. I can call the report from Silverlight and it works as expected. Fine! But clicking the refresh-button in ReportViewer is NOT calling the report again, instead it is presenting the old one (I can determine this by looking at the time string which is not changing). What am I doing wrong?

This affects Reporting 6.1.12.820 with SL 5.

Regards
Neils
Hrisi
Telerik team
 answered on 19 Sep 2012
1 answer
109 views
Hi all,

I bind a list object as a data source in my report. I created a group and for every 'id' in detail section i want to show two properties in chart. Think that my class is

public class SurveyListGraphicalCompareModel
    {
        public string Question{ get; set; }
        public Guid? QuestionID { get; set; }
        public decimal? avgScore { get; set; }
        public decimal? avgScoreEx { get; set; }
    }

I produce List<SurveyListGraphicalCompareModel> data source from database and bind it to report in my
page's code behind like that :

Reporting.GraphicalComparison rapor = new Reporting.GraphicalComparison();
 myReport.DataSource = myDataSource;
 this.ReportViewer1.Report = myReport;


I grouped data source by QuestionID. And for every QuestionID i want to display Question and a chart(Avg-Sc
ore, AvgScoreEx) in a horizontal series orientation. But i failed and get "There is no or empty series"
error. I could understand how to identify a series regarding to data source field. Could not find any
tutorial explains how to dynamically data bind in telerik reporting chart.
 The examples i looked up were always on static data source. Could you please show me some examples about that or help me for this specific problem.

Thanks. 
Steve
Telerik team
 answered on 19 Sep 2012
1 answer
994 views
I am trying to use multiple objectDataSource in a single report but i got an error

 Only fields from the current data source 'objectDataSource1' are allowed 


I added objectDataSource1 first then another one named objectDataSource2.

i need to add some fields in Report from objectDataSource2. but i get this error.
Please tell me how can i overcome this problem.
thank you. 

I am using Telerik Reporting Q2 2012 

Elian
Telerik team
 answered on 19 Sep 2012
1 answer
372 views
We are using Telerik Report Viewer in our Web Application. During development and testing on my local machine I all of a sudden began receiving this bug while testing. Any thoughts?

An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Telerik.Reporting.Processing.Expressions.ReportExpressionContext.ResolveNameSpaces()
at Telerik.Reporting.Processing.Expressions.ReportExpressionContext..ctor(Type methodInfoSourceType)
at Telerik.Reporting.Processing.ParametersManager`1..ctor(IReportDocument definition, ICollection`1 parameters)
at Telerik.ReportViewer.WebForms.ParametersPage.get_ParamsManager()
at Telerik.ReportViewer.WebForms.ParametersPage.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Telerik.ReportViewer.WebForms.ParametersPage.OnPreLoad(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Steve
Telerik team
 answered on 19 Sep 2012
1 answer
98 views
Hello

Is there a way to make the paging style for the reportviewer to look the same as a Telerik grid? (image examples attached)
The only way I can see would be to change the Grid using the PagerTemplate.

Am I missing something re the style for the reportviewer?

Thanks
Steve
Telerik team
 answered on 19 Sep 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?