Telerik Forums
Reporting Forum
15 answers
1.2K+ views
Hi,

I'm trying to create a report that groups data by a certain field and will then show a grap for each group. In my report I'm trying to use a datasource that contains the following data:
ID,X,Y,Group (<== column names)
0,0,1,1
1,1,1,1
2,0,2,2
3,2,2,2
4,0,3,3
5,3,3,3

This is what I have done so far:
- I've added a group to this report with the Grouping property set to '= Fields.Group'
- In the group header section I've added a textbox that prints the value for the 'current' Group
- In the detail section I've added textboxes that print the values for X and Y

This works as I would expect it to, but now I want to add a graph (Type = Point) to the group header section that will show the two points for each group with the above coordinates. So what I want to achieve is that three headers are generated and that each one has a graph that shows two points.

I'm trying to use the needdatasource event that gets thrown three times in this case. In my attempt to get the above working, I used the following code:
Private Sub Chart1_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.NeedDataSource 
        Dim myChart As Telerik.Reporting.Processing.Chart = DirectCast(sender, Telerik.Reporting.Processing.Chart) 
        If Chart1.Series.Count = 0 Then 
 
            Chart1.Series.Add(New Charting.ChartSeries("Test", Charting.ChartSeriesType.Point)) 
            Chart1.Series(0).DataXColumn = "Fields.X" 
            Chart1.Series(0).DataYColumn = "Fields.Y" 
 
 
        End If 
 
        If myChart.DataSource Is Nothing Then myChart.DataSource = Me.DataSource 
 
 
    End Sub 
Unfortunately this does not work. I can see that a graph is generated three times, but each one has the same four points: 0,0 and 1,1 and 2,2 and 3,3.
What am I doing wrong and how do I get this to work for each group header section so that I have three different graphs with the following points:
Graph 1: 0,1 and 1,1
Graph 2: 0,2 and 2,2
Graph 3: 0,3 and 3,3
Stef
Telerik team
 answered on 23 Jul 2015
3 answers
45 views

Hello! 

I have a mvc project and in a form submit i have in my hands a complex object.

Lets assume that the object is:

Warehouse,

City

Country

Date

ProductPrice

Product

 Quantity

The list of object is already filtered by warehouse city and country, and the goal is to build the report with that in the Header, and a list of lines with:

Date, Product, Price (base on the quantity and price), 

 and then Total's (Total price).

 

Is there a way to do all by code? Whats the best aproach to accomplish this?

 

Thanks! 

M. Macias

 

 

ps: I dont want to use the table wizard to get the datasource, because it must be calculated in server side. ​

Stef
Telerik team
 answered on 23 Jul 2015
1 answer
312 views

I'm using version 2012 Q2. I'm trying to export a Report object and am getting the following error: "Invalid Value of Report Parameter". I'm getting this error when my string parameter has multiple values, such as: "111,222,333". If the parameter has only one selection, such as "111" (not a comma delimited string) there is no exception raised. Here is the code for rendering/exporting report:

var result = reportProcessor.RenderReport("XLSX", rpt, deviceInfo);

So, in short, when a string parameter that's not a comma delimited list is passed, the report exports. When the string represents a multi-select combobox, and is comma delimited, the "Invalid Value of Report Parameter" exception is raised. Why is this occurring? 

 

 

  

 

Stef
Telerik team
 answered on 23 Jul 2015
2 answers
114 views

Hey there,

 

We bought some time ago the telerik system (reporting) for a solution, that we set up for a custumor. This solution was build as a 32bit application and shall be now comiled with the option "any cpu". Unfortunatly the reference to the 'telereik'-Reporting dll is based on a 32bit system.

 Is there anyway that we get the Reporting Q2 2012 Any CPU Dll.

The needed dlls are :

1. Telerik.ReportViewer.WinForms.dll

2. Telerik.Reporting.dll​

 

Best regards

nawid

 

 

Nawid
Top achievements
Rank 1
 answered on 23 Jul 2015
1 answer
97 views
Hello, I have 3 tables to show in a report, table 1 will have a lot of rows, while table 2 and table 3 will have less rows, I want to show table 2 and table 3 on the right side of table 1 just like my design shows, I'm uploading one screen with the designer and the wrong result. Hope I made myself clear, thank you !
Ing. Jesus Manuel
Top achievements
Rank 1
 answered on 22 Jul 2015
1 answer
176 views

 Hi,

 We are looking to override NavigateToUrl(url, target) so that the report is displayed in the same window which is an iFrame currently it navigates to top which is a new window. The version we are using is Telerik.ReportViewer.WebForms, Version=6.2.13.110.
 How would we do this?

Already tried http://www.telerik.com/forums/is-it-possible-to-use-javascript does not work.
Attach a screen print of our output from dev tools does not update target.

 

Thanks 

Mark

Stef
Telerik team
 answered on 22 Jul 2015
4 answers
575 views

Hi,

Need help in converting the currency to words for different  language cultures like "us" and "ru".

What I have is the total of the currency value, say 285630. Now I have to convert it to words for english-US it should be "two hundred eighty-five thousand six hundred thirty" and similarly it should convert accordingly if the language culture is Russian-RU.

Please suggest.

Amar
Top achievements
Rank 1
 answered on 22 Jul 2015
2 answers
354 views

Hi,

 I am facing an issue of UI format with report viewer control. My report displays perfectly when I export it to PDF but it is not displaying so when  it is on ReportViewer control.

I have used textboxes in detail section within subreport and these text boxes appears in form of table in final report. But on the UI(on ReportViewer control on Window Forms) it is not showing textbox borders properly. But suprisingly the borders are perfectly there if I export the report to PDF.

 Any suggestion ?

Amar
Top achievements
Rank 1
 answered on 22 Jul 2015
1 answer
290 views

Hi everybody,

I've just created a .trdx report containing a subreport using Telerik Report Designer. I would like to export a pdf file based on this report so I've created a web page having this method server side:

void ExportToPDF()
{
    var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
    var deviceInfo = new System.Collections.Hashtable();
 
    UriReportSource NetCatalogPDF = new UriReportSource();
    NetCatalogPDF.Uri = Server.MapPath("~/Report/Standard/CatalogPDF.trdx");
 
    NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("CompanyCode", CompanyCode));
    NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("LanguageCode", PageLanguage));
    NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("FamilyId", (ddlFamily.SelectedValue != "-1") ? ddlFamily.SelectedValue : null));
    NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("IncludePrices", chkIncludePrices.Checked));
 
    if (chkIncludePrices.Checked)
    {
        NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("PriceListCode", ddlPriceList.SelectedValue));
        NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("CustomerCode", txtCustomerCode.Text));
    }
    else
    {
        NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("PriceListCode", null));
        NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("CustomerCode", null));
    }
     
    NetCatalogPDF.Parameters.Add(new Telerik.Reporting.Parameter("ImagesPath", Server.MapPath("/Catalog/public/images/catalog/products/zoom")));
 
    var connectionStringHandler = new ReportConnectionStringManager(ConnectionString);
 
    try
    {
        var reportSource = connectionStringHandler.UpdateReportSource(NetCatalogPDF);
        var result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
 
        this.Response.Clear();
        this.Response.ContentType = result.MimeType;
        this.Response.Cache.SetCacheability(HttpCacheability.Private);
        this.Response.Expires = -1;
        this.Response.Buffer = true;
 
        // Uncomment to handle the file as attachment
        //Response.AddHeader("Content-Disposition",
        //              string.Format("{0};FileName=\"{1}\"",
        //                              "attachment",
        //                              "Report.pdf"));
 
        this.Response.BinaryWrite(result.DocumentBytes);
        this.Response.End();
    }
    catch (Exception ex)
    {
        ErrMess = ex.Message;
    }
}

 

 Anyway the line

var result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);

throw an exception:

Cannot find the file 'c:\windows\system32\inetsrv\CatalogPDF_Sub.trdx'. "CatalogPDF_Sub.trdx" is subreport file name. Obviously the path is wrong because that file is located in the same main report folder ("~/Report/Standard/").

How can I solve this problem?

 Thank you in advance for your replies.

Stef
Telerik team
 answered on 21 Jul 2015
1 answer
52 views

Where there is an complete example Download about Telerik Reporting with EF.

Please tell me. Thank you!

Stef
Telerik team
 answered on 21 Jul 2015
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?