Telerik Forums
Reporting Forum
4 answers
220 views
Prior to Q1 I used this in my subreport:

 

 

private void MySubReport_NeedDataSource(object sender, EventArgs e)  
{  
 
    Processing.Report report = (Processing.Report)sender;  
    Processing.IDataObject dataObj = (Processing.IDataObject)report.DataObject;  
    MyClass myObj = dataObj.RawData as MyClass;  
    ...  
}  
 
 

 

 

In Q1 raw data returns null. Is there a way to cast MyClass or is my access restricted to String s = dataObj["valName"];  ?

Thanks

 

Jon
Top achievements
Rank 1
 answered on 19 Mar 2010
0 answers
131 views
I updated something with my report and then clicked refresh but it didn't work. I had to click select button where it get datasource again and rebind reportviewer to refresh report.

Or I need to do anything else with refreshing function to make it work? Please give me a suggestion.
Pakorn
Top achievements
Rank 1
 asked on 19 Mar 2010
1 answer
77 views
Hi guys,

I wanted to ask if it is possible to have paging on web viewer of report containing only one simple crosstab element.

When the page and the report are rendered, even when it has 300 rows, it is displayed in one page. But if I export to PDF, or print the report, it appears on 20+ pages. I want the basic HTML display to be paged as well, because the page has rendering problems with such large report.


Thanks,

Dave
Peter
Telerik team
 answered on 19 Mar 2010
2 answers
107 views
Hi,

I've made some reports with the tryal version 2009 Q3 and, just installed the developper version 2010 Q1. While the installation, it asks me to uninstall previous versions. I did. Install the version and make an upgrade with the Telerik Report Upgrad wizard. So, in several reports, I trap the GroupHeader_ItemDataBound event, cast the sender to a GroupSection variable and cast the in a datarow like the next exemple :

Private Sub moduleIDGroupHeader_ItemDataBound(ByVal sender As ObjectByVal e As System.EventArgs) Handles moduleIDGroupHeader.ItemDataBound  
        Dim Group As Telerik.Reporting.Processing.GroupSection = DirectCast(sender, Telerik.Reporting.Processing.GroupSection)  
        Dim txtTitle As Telerik.Reporting.Processing.TextBox = DirectCast(Group.ChildElements.Find("txtDMTitle"True)(0), Telerik.Reporting.Processing.TextBox)  
        Dim txtDescription As Telerik.Reporting.Processing.TextBox = DirectCast(Group.ChildElements.Find("txtDMDescription"True)(0), Telerik.Reporting.Processing.TextBox)  
 
        Try 
 
            ' Dim row As System.Data.DataRow = DirectCast(Group.DataObject.RawData, System.Data.DataRow)  
            Dim row As System.Data.DataRow = DirectCast(Group.DataObject.RawData, System.Data.DataRow)  
            txtDescription.Visible = row("DMPDescription")  
 
            txtTitle.Visible = row("DMPTitle")  
            txtTitle.Style.Color = System.Drawing.Color.FromArgb(28, 51, 97)  
 
        Catch ex As Exception  
            Stop 
        End Try 

When the compiler execute the line Dim row As System.Data.DataRow = DirectCast(Group.DataObject.RawData, System.Data.DataRow),
It append an error with the message "Impossible to cast an objet of type '<EnumRawData>d__0' in 'System.Data.DataRow."

I tried to cast to an array of rows, Build, Rebuild, Clean, etc..

Thanks a lot,

Ben
Steve
Telerik team
 answered on 18 Mar 2010
1 answer
86 views
I would glad if there is someone can make a video teaching us how to use sqldatasource in report chart and supporting parameters. It is too difficult for me to use dataset in 2009.
Peter
Telerik team
 answered on 18 Mar 2010
1 answer
134 views
Hi,

I am trying to get a pie chart to work similar to your sales dashboard demo. 
I am using the following sql:
"SELECT SUM(Value) AS [Sum], C.Name FROM (Category AS C INNER JOIN Subcategory AS SC ON C.Id=SC.Category_id) INNER JOIN [Data] AS D ON SC.ID=D.SubCategory_Id WHERE [Year]=@Year GROUP BY C.ID, C.Name ORDER BY C.ID"

For the series property I am using name as the DataLablesColumn and sum as the DataYColumn

However, when i run the report I see the name in both the legend as well as the pie chart section. What property do i need to set to see the sum on the chart and the name on the legend.

Also do you have a video of the pie chart design? The one on telerik tv is for bar charts and I see that pie charts are quite different in implemetation.

Thanks
Chavdar
Telerik team
 answered on 18 Mar 2010
2 answers
110 views
I have a report with a sub report on it. In order to set the data source of the sub report I use the SubReport_ItemDataBinding event as shown below.

 

private void SummarySubReport_ItemDataBinding(object sender, EventArgs e)

 

{

 

DataView dv = new DataView(m_data, "LetterBatchId = 491",

 

 

null, DataViewRowState.CurrentRows);

 

Telerik.Reporting.Processing.

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

 

subReport.InnerReport.DataSource = dv;

}

After updating to 2010 Q1 the innerReport of the subReport is null.
Why has this changed and how can I get this working again?

Steve
Telerik team
 answered on 18 Mar 2010
1 answer
84 views
I am doing reporting using a business object. The business object has sub-collections that I want to include in the report.

I used to do this to get to the raw data:

 

Private Sub Table1_NeedDataSource(ByVal sender As ObjectByVal e As System.EventArgs) Handles Table1.NeedDataSource  
    Dim tab1 As Telerik.Reporting.Processing.Table = DirectCast(sender, Telerik.Reporting.Processing.Table)  
    Dim idata1 As Telerik.Reporting.Processing.IDataObject = DirectCast(tab1.DataObject, Telerik.Reporting.Processing.IDataObject)  
    Dim obj1 As myobject = DirectCast(idata1.RawData, myobject)  
    '  
    tab1.DataSource = obj1  
End Sub 
 

 

 

 


This no longer works in Telerik Reporting 2010 Q1. What the best way to get to the raw data object?

Brad

UPDATE:  Looks like this is already reported as issue 1318 and I see a workaround another post on this same issue. I will try the workaround until there is a better method.

Steve
Telerik team
 answered on 18 Mar 2010
0 answers
107 views
step by step, your video cant watch
shane
Top achievements
Rank 1
 asked on 18 Mar 2010
2 answers
131 views
Hi,

I'm trying to configure Telerik Reporting to make the preview able to get datasource from WCF Webservice. In runtime mode, it works well, but in design mode it tells me that the endpoint is not found. I think the configuration file is not found and tried to copy it into some bin folders but nothing works. Here is my project organization :

-1) a Web project that launches the silverlight app
-2) a Silverlight application project that hosts a Silvelright Report Viewer
-3) a WCF Webservice project that gives the possibility to grab datas from the DB.
-4) a standard class library project that contains my reports

My reports make calls to webservice through WCF but the preview doesn't work.

Where do I have to copy a configuration file to make it works ? and how do I have to name it please ?
In fact, what I would like to know is : when you click preview in the report designer, in which folder is run the preview rendering ? 

Thanks, 

Regards
Steeve

LE DREAU Steeve
Top achievements
Rank 1
 answered on 17 Mar 2010
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?