Telerik Forums
Reporting Forum
1 answer
90 views
Are there any plans to add a web based designer in the future?  Something that would allow end users to edit / create reports via a browser.
Steve
Telerik team
 answered on 27 May 2010
3 answers
173 views
Hi, I try to do the same thing you do on one of your Telerik video. I am using silverlight 4 with RIA service.

I use the Business Application templace and add a ReportLibrary in the solution.
In this ReportLibrary I add a simple report named BasicReport.cs

Each time the RaportViewer try to load the rapport i got this error:
Could not load file or assembly 'ReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Here my test page:
<navigation:Page   
  x:Class="GestionMembre.About"   
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:RepportViewer="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight" 
  mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"    
  Style="{StaticResource PageStyle}" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">  
 
    <Grid x:Name="LayoutRoot">  
        <RepportViewer:ReportViewer x:Name="xReportViewer" ReportServiceUri="../ReportService.svc" Report="ReportLibrary.BasicReport, ReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">  
        </RepportViewer:ReportViewer> 
          
    </Grid> 
 
</navigation:Page> 


I test with Reflector to be sure of my assembly name...

Any suggestion?
john baker
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
231 views
I have a a data object that makes a call to a domain context within the web application to retrieve data. The data object loops through this data to build a list that is used by the report. The report appears to execute properly with no errors and the data is displayed properly when the report is run. The problem that I am having is in the report design tool. If I include the code that actually performs the call to the domain context, the "Data Explorer" does not display the field names from the data object. If I comment out the code that calls the domain context, the field names are displayed properly.  I have moved the domain context code out to an external file (outside of the data object) but with the same results.

            //return DomainContext.GetStatusData(null, timeToUse);      <== Data Explorer says "No Data Source"
            return null;                                                                              <== Data Explorer displays data fields

I can set it to "null" when I create the report and set it back to the proper call when I run the report, but it is a pain to do that for all reports that we intend to build. Do you have any recommendations?

Thanks,
Aaron
Steve
Telerik team
 answered on 26 May 2010
2 answers
260 views
Hello,

I'm trying to produce a Line chart that will show me the evolution of the amount of issues for each category over time.
I'm not being able to acomplish it.

I'm looping through a List of categories and for each category I'm creating a ChartSeries where I'm adding ChartSeriesItems containing as YValue their count.

As a side note, for each category I'm fetching its associated Issues and then I'm groupping them by the month and year part of its creation date.

The final output is exactly what I need but...When I run the chart, the dates are showing up on the Y axis (hey what?!!) although I'm explicitly assigning the count of Issues to the YValue of each ChartSeriesItem!

Here's my code (the important part of it) :

I have an IEnumerable that creates my ChartSeries (each category will be a serie):

        private IEnumerable<ChartSeries> CategoryEvolutionSeries(Telerik.Reporting.Chart chart)  
        {  
 
             
            var cats = issues.GroupBy(x => x.CategoryName);  
            List<string> Categorias = new List<string>();  
 
            foreach (var cat in cats)  
            {  
                Categorias.Add(cat.Key);  
            }  
 
 
            foreach (string cat in Categorias)  
            {  
                var IssuesPerCat = issues.Where(x => x.CategoryName == cat);  
                var group = IssuesPerCat.GroupBy(x => x.DateCreated.ToString("yyyy/MM"));  
 
                ChartSeries series = new ChartSeries();  
                series.Appearance.PointMark.Dimensions.Width = 5;  
                series.Appearance.PointMark.Dimensions.Height = 5;  
                series.Appearance.PointMark.FillStyle.MainColor = Color.Black;  
                series.Appearance.PointMark.Visible = true;  
 
                group = group.OrderBy(x => x.Key);  
 
                series.Appearance.LabelAppearance.Visible = false;  
                series.Appearance.ShowLabels = true;  
                series.Name = cat;  
                series.Type = ChartSeriesType.Line;  
 
                foreach (var issue in group)  
                {  
                    ChartSeriesItem item = new ChartSeriesItem();  
                    item.YValue = issue.Count();  
                    series.Items.Add(item);  
                }  
 
                yield return series;  
 
 
            }  
 
        } 

Then, I assign the series to my chart on the NeedDataSource Event:

                defChart.Series.Clear();  
 
                foreach (ChartSeries item in evolseries)  
                {  
                    defChart.Series.Add(item);  
                } 

Since I can't send you the project files (they're part of a big big solution with lots of dependencies) I'm attaching a screenshot of the resulting Chart.

Please help, what am I doing wrong here??
Ves
Telerik team
 answered on 26 May 2010
1 answer
146 views
Hello,

I have tried every single example found to set my XAxis values but none of them seems to work for me.
I'm populating a Line chart manually with a List of objects and it works just fine. I am also setting the XAxis ValueFormat to ShortDate and whatever I do, this includes clearing the collection of ChartAxisItems and adding with my own, I only get dates in the range of 1899/01/01...1900/01/01 etc etc even when I'm explicitly adding items with dates like "2010-01-01...2010-06-01" in OADate format.
I tried to set the Min and Max values of my XAxis to 01/01/2010 to 01/07/2010 but it doesn't produce any effect.


Here's some code because I know you'll ask:

NeedDataSource Event:
 chart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.ShortDate;  
              
            List<Issue> issues = new List<Issue>();  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-01-2010")});  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-01-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-01-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-02-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-02-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-03-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-04-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-04-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-04-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-04-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-04-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-05-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-05-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-05-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-06-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-06-2010") });  
            issues.Add(new Issue() { CategoryName = "Teste1"DueDate = DateTime.Parse("01-06-2010") });  
 
 
            var cats = issues.GroupBy(x => x.CategoryName);  
 
            List<string> Categorias = new List<string>();  
            chart1.Series.Clear();  
 
            chart1.PlotArea.XAxis.MinValue = DateTime.Parse("01-01-2010").ToOADate();  
            chart1.PlotArea.XAxis.MaxValue = DateTime.Parse("01-07-2010").ToOADate();  
            foreach (var cat in cats)  
            {  
                Categorias.Add(cat.Key);  
            }  
 
 
            foreach (string categoria in Categorias)  
            {  
                var issuesissuesPerCat = issues.Where(x => x.CategoryName == categoria);  
                var groupedIssues = issuesPerCat.GroupBy(x => x.DueDate.ToString("dd/MM/yyyy"));  
 
                ChartSeries series = new ChartSeries();  
                series.Type = ChartSeriesType.Line;  
 
 
                foreach (var issue in groupedIssues)  
                {  
                    ChartSeriesItem csitem = new ChartSeriesItem();  
                    csitem.YValue = issue.Count();  
                    series.Items.Add(csitem);  
                    chart1.PlotArea.XAxis.AddItem(issue.Key);  
                     
                }  
 
 
                chart1.Series.Add(series);  
            } 

and in the attached file is the result of this code...

P.S.: For the record, I'm using the latest version of Q1 2010 (Version=4.0.10.423)

 

Antonio Simoes
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
213 views
Hello,

I'm new here and testing the report tool.

I am trying to create a template (report) for our orders to suppliers.
I like to pass my Order object as datasource what works fine. So i can put info in the report about my supplier (name,address,...)
about my company (name, phone,....). Those two are subobjects of Order (Supplier and Company). So i can access fields from those subobjects of Order.

Now the problem starts with my OrderLines when Order is my datasource i can't use my object orderline that is in the collection OrderLines (this OrderLinesCollection is an object of Order). The expression would look like this =Fields.OrderSupplierLineCollection.Item.Product.Family. Seems i can't reach item in a collection?
Error i get after using the tablewizard : 
An error has occured while processing TextBox 'textBox19':
Common Language Runtime detected an invalid program.
I tryed to do this with a tablewizard and a subreport. (did not find an example that covers this)

So we want a total dynamic orderreport. Company,supplier,lines is all dynamic.
In the header we put the contactinfo of our company and the supplier. In the detail of the report we would like to see our orderlines.
This all with just one Order object that contains all the info.

Is this possible? Where am i going wrong?
Kind Regards,

Koen L
Top achievements
Rank 1
 answered on 26 May 2010
3 answers
206 views
Hi,

How can i have multiple series in chart? How can i create it programmatically? See attached images of my requirement. I don't find any sample on the web. Pls help me on how to proceed for this.

Thanks in advance.
Steve
Telerik team
 answered on 26 May 2010
5 answers
85 views

I have several reports that are built dynamically that stopped working after we upgraded to the Q3 2009 release, using version 3.2.9.1211. I tried setting the ReportViewer's EnableViewState property to false and that had no impact on the problem. When the report is generated a 1-page blank report appears.

 

I took one of the Telerik sample provided on this forum and put it in a small, much simpler project. I receive the exact sample behavior. Here is the code that I am using:

 

using

 

System;

 

 

 

using

 

System.Web;

 

 

 

using

 

System.Web.UI;

 

 

 

using

 

System.Web.UI.WebControls;

 

 

 

using

 

System.Data;

 

 

 

using

 

System.Configuration;

 

 

 

using

 

System.Web.Security;

 

 

 

using

 

System.Web.UI.WebControls.WebParts;

 

 

 

using

 

System.Web.UI.HtmlControls;

 

 

 

using

 

Telerik.Web.UI;

 

 

 

using

 

Telerik.Reporting;

 

 

 

using

 

Telerik.Reporting.Drawing;

 

 

 

public

 

partial class Default : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

Telerik.Reporting.

Report rpt = new Telerik.Reporting.Report();

 

 

DataSet ds = new DataSet();

 

ds.Tables.Add();

 

DataTable table = ds.Tables[0];

 

 

int columnCount = 3;

 

 

int rowCount = 1000;

 

 

//Add columns

 

 

 

 

 

for (int column = 0; column <= columnCount - 1; column++)

 

{

table.Columns.Add(

"Column" + (column + 1).ToString(), typeof(string));

 

}

 

//Add rows

 

 

 

 

 

for (int row = 0; row <= (rowCount - 1); row++)

 

{

 

string[] rowVals = (string[])Array.CreateInstance(typeof(string), columnCount);

 

 

DataRowCollection rowCollection = table.Rows;

 

 

for (int column = 0; column <= columnCount - 1; column++)

 

{

rowVals[column] =

"value_" + (column + 1).ToString() + "_" + (row + 1).ToString();

 

}

table.Rows.Add(rowVals);

}

rptViewer.Report = GenerateReportDefinition(

ref ds);

 

rptViewer.RefreshReport();

}

 

private Telerik.Reporting.TextBox CreateTxtHeader(string FieldName, int i)

 

{

Telerik.Reporting.

TextBox txtHead = new Telerik.Reporting.TextBox();

 

txtHead.Value = FieldName;

 

return txtHead;

 

}

 

private Telerik.Reporting.TextBox CreateTxtDetail(string FieldName, int i)

 

{

Telerik.Reporting.

TextBox txtHead = new Telerik.Reporting.TextBox();

 

txtHead.Value =

"=[" + FieldName + "]";

 

 

return txtHead;

 

}

Telerik.Reporting.

Report GenerateReportDefinition(ref System.Data.DataSet dataSource)

 

{

Telerik.Reporting.

Report report1 = new Telerik.Reporting.Report();

 

report1.DataSource = dataSource;

 

int count = dataSource.Tables[0].Columns.Count - 1;

 

Telerik.Reporting.Drawing.

Unit x = Telerik.Reporting.Drawing.Unit.Inch(0);

 

Telerik.Reporting.Drawing.

Unit y = Telerik.Reporting.Drawing.Unit.Inch(0);

 

 

SizeU size = new SizeU(Telerik.Reporting.Drawing.Unit.Cm(2), Telerik.Reporting.Drawing.Unit.Inch(0.3));

 

Telerik.Reporting.

ReportItemBase[] headColumnList = new Telerik.Reporting.ReportItem[count];

 

Telerik.Reporting.

ReportItemBase[] detailColumnList = new Telerik.Reporting.ReportItem[count];

 

 

for (int column = 0; column < count; column++)

 

{

 

string columnName = dataSource.Tables[0].Columns[column].ColumnName;

 

Telerik.Reporting.

TextBox header = this.CreateTxtHeader(columnName, column);

 

header.Location =

new Telerik.Reporting.Drawing.PointU(x, y);

 

header.Size = size;

headColumnList[column] = header;

Telerik.Reporting.

TextBox textBox = this.CreateTxtDetail(columnName, column);

 

textBox.Location =

new Telerik.Reporting.Drawing.PointU(x, y);

 

textBox.Size = size;

detailColumnList[column] = textBox;

x += Telerik.Reporting.Drawing.

Unit.Inch(1);

 

}

Telerik.Reporting.

ReportHeaderSection reportHeaderSection1 = new Telerik.Reporting.ReportHeaderSection();

 

reportHeaderSection1.Height =

new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);

 

 

//reportHeaderSection1.Style.BackgroundColor = Color.LightGray;

 

 

 

 

reportHeaderSection1.Items.AddRange(headColumnList);

Telerik.Reporting.

DetailSection detailSection1 = new Telerik.Reporting.DetailSection();

 

detailSection1.Height =

new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);

 

detailSection1.Items.AddRange(detailColumnList);

report1.Items.Add(reportHeaderSection1);

report1.Items.Add(detailSection1);

 

return report1;

 

}

}

Valerie
Top achievements
Rank 1
 answered on 26 May 2010
2 answers
248 views
I have a project with Silverlight Reporting that works fine in dev. environment.
But in production i have this error on ReportViewer: 'An exception ocurred during the operation, making the result invalid. Check InnerException for exception details'.
My server is a virtual server.
I try to access the ReportService.svc, but have the  following error:
The type 'Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, Version=4.0.10.423, Culture=neutral, PublicKeyToken=a9d7983dfcc261be', provided as the Service attribute value in the ServiceHost directive could not be found
I´m not sure if is correct this response from ReportService.svc, in dev. enviroment the service is found fine.

I´m using Telerik Reporting Q1 2010, VS 2010 RTM,

I need to change something in configuration of server?

Thanks in advance.
Onaji Fernanda
Top achievements
Rank 1
 answered on 25 May 2010
1 answer
2.3K+ views
Hi there,

I am trying Telerik Reports, I need to include multiple detail sections in my reports, I have searched for this in forum and documentation, but i was unable to find this. I just wanted to know Is this feature available in telerik, If yes, can you suggest me how to do this?


Thanx.
Peter
Telerik team
 answered on 25 May 2010
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?