Telerik Forums
Reporting Forum
3 answers
138 views
Hi,
Following an test upgrade to .Net 4.5.1 I have had a problem with reporting.  Webpages that used to work now don't workl properly.

I have reduced the page down to a small sample.  The problem is that when a filter button is pressed the ajax call is done with the reportviewer flashing a loading panel then it shows the "The source of the report definition has not been specified." message.  Looking at the codebehind the report is generated OK and is in fact applied to the report viewer.  As mentioned this all works fine with .Net 3.5.

To further test I disable Ajax on the AjaxManager and then following the post back the control works as it should so this is definitly an Ajax issue of some sort.  I am posting the code below.

It is worth noting that I have tried this on two distinct website solutions that I have and exactly the same issue appears.  

Many thanks for any help.

Regards

Jon

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Reports.aspx.vb" Inherits="NJC.WasteMonitor.Web.Gen.Reports" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadStyleSheetManager ID="pgRadStyleSheetManager" runat="server"></telerik:RadStyleSheetManager>
            <telerik:RadScriptManager ID="pgRadScriptManager" runat="server"></telerik:RadScriptManager>
            <telerik:ReportViewer ID="uxReportViewer" runat="server" Width="100%" Height="500px" Skin="Office2007"></telerik:ReportViewer>
            <telerik:RadButton ID="uxLoginButton" Text="Test" runat="server" UseSubmitBehavior="false"  OnClick="uxLoginButtonClick"
                               CausesValidation="false"></telerik:RadButton>
            <telerik:RadAjaxManager ID="uxRadAjaxManager" runat="server"  >
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="uxLoginButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="uxReportViewer" LoadingPanelID="uxLoadingPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="uxReportViewer">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="uxReportViewer" LoadingPanelID="uxLoadingPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="uxLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>
        </form>
    </body>
</html>


Partial Public Class Reports
    Inherits System.Web.UI.Page
 
    Protected Sub uxLoginButtonClick(ByVal sender As Object, ByVal e As EventArgs)
        Dim _report As WasteReportReport = New WasteReportReport(GetWasteMonitorConnectionString, "4,5,2", _
                                                                      1, _
                                                                      CDate("01-Aug-2014"), _
                                                                      CDate("06-Aug-2014"), _
                                                                      "", _
                                                                      "", _
                                                                      "", _
                                                                      "", _
                                                                      "")
 
 
        ' Define a reportsource and add the report to it
        Dim _instanceReportSource As Telerik.Reporting.InstanceReportSource = New Telerik.Reporting.InstanceReportSource()
        _instanceReportSource.ReportDocument = _report
 
        ' Add the report source to the report viewer
        uxReportViewer.ReportSource = _instanceReportSource
    End Sub
End Class


Jon
Top achievements
Rank 1
 answered on 29 Oct 2014
4 answers
229 views
Hiya.  I am new to Telerik, using Telerik 2011 Q3 in Visual Studios 2010 on a latop running Windows 7.  Currently I am trying to create a Telerik report using Oracle data and am confused by what is happening with the query. 

The query is fairly large, but executes properly in TOAD.  When I move it to Visual Studios I get mixed results:

1.  When I try to execute the query in Query Builder, I get an "SQL Syntax Errors Encountered" message that says
"Error in SELECT clause: expression near 'SELECT'.
Missing FROM clause.
Error in SELECT clause: expression near ','.
Error in SELECT clause: expression near 'FROM'.
Unable to parse query text."

2. If I bypass Query Builder and continue to the Preview Data Source Results and click Execute Query, the query completes consistantly in approx 2 min.

3. When I go to the Telerik Report Preview mode, enter the variables and click PREVIEW, the hour glass spins but the query never completes.  I have waited 15 min by the clock and not gotten any results (remember the query completes in 2 min in the Preview Data Source Results pane.

I don't know Visual Studios well enough to understand the significance of it working in the  Preview Data Source Results but failing in both the Query Builder and the Report Preview.  It seems strange to me that the Query Builder reports multiple syntax errors, yet the query completes successfully in Preview Data Source Results. I've never seen an SQL query with syntax errors work before, so I am sceptical about the Query Builder error message.  The report does have nested SELECTstatements, which I  assume has something to do with the messages about problems near SELECT and FROM. At the same time, it isn't completing in PREVIEW mode in the report, so something is obviously wrong.

Can someone please shed some light on what is happening?

Thanks!
Kevin
Peter
Telerik team
 answered on 29 Oct 2014
8 answers
491 views
Hello 

I have been evaluating the Telerik-Reports and so far I find them very good. However, when it comes to hierarchical data, I just can't get the reports to work at all. I made up a simplified example, that would be very typical for our company. Should we be able to generate reports using such a hierarchy as datasource, I could convince my boss to purchase Telerik-Reports ;)

I have been trying with subreports as well as groups and tables. However, I can not get it to display any of the sub-classes if they contain either a dictionary or a list. I think the problem is, that it won't recognize the DataSource correctly.

Background for the problem:
I have a list with people (drivers) and I would want to display a report where you can see on what days the people worked and how much work they have done. 

I use the free trial version (Q1_2012_v6_0_12_302) and .NET 4.0 and I am certain that my list contains valid test data. Note, that I have a dictionary as well as lists inside the Classes.

List<DriverDto> drivers;    // this would be the DataSource

// the corresponding data structure
public class DayDto
{
    public DateTime Day { get; set; }
    public int CalendarWeek { get; set; }
    public int Work { get; set; }
    public int Break { get; set; }
}

public class YearDto
{
    public List<DayDto> Days { get; set; }
    public string Year { get; set; }

    public YearDto()
    {
        Days = new List<DayDto>();
    }
}

public class DriverDto
{
    public string Surname { get; set; }
    public string FirstName { get; set; }
    public Dictionary<int, YearDto> Years { get; set; }

    public DriverDto()
    {
        Years = new Dictionary<int, YearDto>();
    }
}

Desired outcome:
The report should look something like this.

=============================================
Peter Parker
=============================================
2011
------------------------------------------------------------------------
January
Date                                 Work (Hours)      Break (Hours)
2011.01.01                         2.5                     1.0
2011.01.02                         2.0                     0.5
Total CalendarWeek 52    4.5      1.5

2011.01.03   3.5                     0.7
2011.01.04                         1.0                     0.2
2011.01.05                         3.0                     0.2
2011.01.06                         2.3                     0.5
2011.01.07                         2.5                     0.2
2011.01.08                         2.7                     0.5
2011.01.09                         3.2                     0.2
Total CalendarWeek 01     18.2                    2.5

2011.01.10                         3.5                      0.7
2011.01.11                         1.0                      0.2
2011.01.12                         3.0                      0.2
2011.01.13                         2.3                      0.5
2011.01.14                         2.5                      0.2
2011.01.15                         2.7                      0.5
2011.01.16                         3.2                      0.2
Total CalendarWeek 02     18.2                     2.5

Total January                      40.9                    6.5
------------------------------------------------------------------------

=============================================
Bruce Banner
=============================================
2011
------------------------------------------------------------------------
January
Date                                 Work (Hours)      Break (Hours) 
2011.01.01                         2.5                    1.0
2011.01.02                         2.0                    0.5
Total CalendarWeek 52      4.5                    1.5

2011.01.03                         3.5                     0.7
2011.01.04                         1.0                     0.2
2011.01.05                         3.0                     0.2
2011.01.06                         2.3                     0.5
2011.01.07                         2.5                     0.2
2011.01.08                         2.7                     0.5
2011.01.09                         3.2                     0.2
Total CalendarWeek 01     18.2                    2.5

2011.01.10                         3.5                     0.7
2011.01.11                         1.0                     0.2
2011.01.12                         3.0                     0.2
2011.01.13                         2.3                     0.5
2011.01.14                         2.5                     0.2
2011.01.15                         2.7                     0.5
2011.01.16                         3.2                     0.2
Total CalendarWeek 02     18.2                    2.5

Total January                     40.9                    6.5
------------------------------------------------------------------------ 

2012
------------------------------------------------------------------------ 
January
Date                                 Work (Hours)      Break (Hours) 
2011.01.01                         2.5                     1.0
Total CalendarWeek 52     2.5                      1.0

2011.01.02                         2.0                     1.0
2011.01.03                         2.0                     1.0
2011.01.04                         2.5                     1.5
2011.01.05                         2.0                     1.5
2011.01.06                         2.0                     1.0
2011.01.07                         2.0                     1.5
2011.01.08                         2.5                     1.5
Total CalendarWeek 01     15.0                    9.0

Total January                     20.0                   10.0
------------------------------------------------------------------------ 

Any hint about how to achieve this would be greatly appreciated.
Stef
Telerik team
 answered on 29 Oct 2014
6 answers
454 views
I just installed version 6.2.13.110 of the Report Designer.  According to the documentation, when adding a SQL Data Source, there should be a "Query Builder" button on the "Configure Data Source Command" screen.  This does not appear to be the case - see attached file.

Any idea why it is missing?
Peter
Telerik team
 answered on 29 Oct 2014
1 answer
140 views
I am really excited to read that it made the cut in this release! Nice going!
Is there somewhere I can read about how to configure/enable it?
Milen | Product Manager @DX
Telerik team
 answered on 29 Oct 2014
1 answer
191 views
I'm working on a proof of concept project where I have implemented a IReportResolver that returns a reportResolver. What I'm curious about, is how I would go about returning custom error messages to display in the HTML5 report viewer. I have logic to catch when I want to display the error, and I'm throwing a new Exception. However it appears that regardless of what I set the exception message to the displayed error in the viewer is always 

{"message":"","exceptionMessage":"Report '0e12f0b0-5adf-11e4-894e-d4ae52a43518' cannot be resolved.","exceptionType":"Telerik.Reporting.Services.Engine.InvalidReportException" ...}.

I would like to be able to return a different exception message such as Telerik.Reporting.Services.Engine.Unauthorized or something to that effect with the message being something that I can change. Are there any ways to do this?

-Randy
Hinata
Top achievements
Rank 1
 answered on 28 Oct 2014
4 answers
819 views
Hi, I'm using Telerik Reporting,
and in one of my reports, I need
to write a paragraph of text
and have it justified. Is there a way
to do this ?

What about list of items, with bullets or numbering ?
How can I add that to my report?

Thanks.


Nasko
Telerik team
 answered on 28 Oct 2014
7 answers
218 views
Hi there,

I have a TextBox in the details section for some disclaimer text content, as you may know, I want to have the text flushed to left and right, but somehow I cannot make it in the Report Designer. Does anyone has had the same situation? or I am just going the wrong way?

Any help is appreciated!

Zhonghai
Nasko
Telerik team
 answered on 28 Oct 2014
2 answers
362 views
Greetings!

So, a Telerik Reports newbie here and I have a question about all of my charts doing this funny little thing with grouping and returning multiple pie/bar/line charts.

So lets start with the basics, I have a Pie Chart that has two columns from the stored procedure... Age Group, and PeopleServed.  The RecordSet should look something like this:

AgeGroup        PeopleServed
0-4                    3
12-14                85
15-17                55
18-20                26
Age not Know   12 

In SSRS in Visual Studio this is a really simple Pie Chart and completed in seconds.  X= AgeGroup, Y=PeopleSever, done!  One pie chart, not one for every AgeGroup repeating the same data over and over again.  However in the stand alone Report Designer I get the attached photo instead.    

I have to admit in my version of the Report Designer (Report Designer Q2 2014) that when I tried to add the data source of a stored procedure from SQL, I couldn't add it.  It simply would not let me add that data set even after I tested it and it had the same number of columns and was indeed retuning data.  I had to add a 'test' data source with two 'dummy' fields of the same name just to get the pie chart added and change the Data Source after.  So on top of that headache, when I do add the correct live data I get this mess of multiple charts.

So I assumed the issue was with the grouping somewhere, so I followed the instructions found on Telerik's website (http://www.telerik.com/help/reporting/graphhowtocreatepiechart.html) on how to set up the seriesGroup, categoryGroup and Series which can be seen in my second file attached.

So, assuming at this point that one of those groups was causing the issue I started to remove them.  All of them at one point.  I even tried to dumb the report down to just an X and a Y axis and I STILL get this grouping of the pie chart showing up 5 times no matter what settings I fix/change/alter.

So I am calling on the experts here...  why is this happening?  What did I do wrong with this and many reports to get these multiple charts to repeat?

Thanks, 

Ed






  
Mosaix
Top achievements
Rank 1
 answered on 28 Oct 2014
1 answer
182 views
I'm currently trialling Reporting, and am a little confused as to how to export a report with data from C#.

I am using the standalone report designer to save a trdx file using the ObjectDataSource and I'm trying to export to PDF, looking at the KB I have the following code block:

Order tempOrder = new Order("12345", "Mr Test");
 
            Telerik.Reporting.Report report = new Telerik.Reporting.Report();
            report.DataSource = tempOrder;
 
            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
            UriReportSource reportSource = new UriReportSource();
            reportSource.Uri = @"E:\Program Files (x86)\Telerik\Reporting Q2 2014\Report Designer\Examples\Order.trdx";
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
 
            string fileName = result.DocumentName + "." + result.Extension;
            string path = System.IO.Path.GetTempPath();
            string filePath = System.IO.Path.Combine(path, fileName);
 
            using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
            {
                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            }

Which seems to output a pdf using my trxd file however I can find no way to pass in both the data source (or the Report variable with data source defined) and the path to the trdx file. 
Stef
Telerik team
 answered on 28 Oct 2014
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?