I'm working on a proof of concept using Telerik Reporting. The requirements are that the report be loaded from an XML source and provide that report with data via a DataTable (from the System.Data namespace). The problem is that my data isn't showing up in my report. The generated report has table in it and it has the right number of rows but there is no information in any of the rows. Below is a copy of the code I'm using to generate the report:
XmlReaderSettings settings =
new
XmlReaderSettings
{
IgnoreWhitespace =
true
};
using
(StringReader sr =
new
StringReader(template.Layout))
//template.Layout contains a string which is the report XML
using
(XmlReader xmlReader = XmlReader.Create(sr, settings))
{
ReportXmlSerializer xmlSerializer =
new
ReportXmlSerializer();
TelerikReport reportInstance = (TelerikReport)xmlSerializer.Deserialize(xmlReader);
DataSet data = BuildDataSet(template, parameters);
//Retreives the data from the database in a DataSet
ObjectDataSource dataSource =
new
ObjectDataSource
{
DataSource = data.Tables[0]
};
reportInstance.DataSource = dataSource;
return
reportInstance;
}
The XML for the report (and the value of template.Layout) can be found here. The generated PDF shows 3 rows which is the same number of rows that the DataTable has. That means the DataTable is being read correctly but the data isn't getting parsed correctly for some reason. If I can get this working it would make Telerik the prime candidate for the final version of the software.
Telerik.Reporting.UriReportSource ur = new Telerik.Reporting.UriReportSource();
ur.Uri = "trpt01.cs";
rptview.ReportSource = ur;
rptview.RefreshReport();
Hi Guys,
I have created a class library for reporting only and used telerik.reporting version 10.2.16.914 in my Class library(myReportingDLL). I referenced my Class Library (myReportingDLL) to a Web Project and Web project have telerik.reporting version 10.1.16.504.
Previously, Web project not giving any error and report runs but now it is giving an error;
"could not load file or assembly 'telerik.reporting, version=10.2.16.914, culture=neutral, publickeytoken=a9d7983dfcc261be' or one of its dependencies. the located assembly's manifest definition does not match the assembly reference. (exception from hresult: 0x80131040)"
Please advise.
Type mismatch in function arguments. Cannot find an overload of the function Join() that accepts arguments of type (String, String).
Hi,
I'm using Visual Studio 2015 w/Telerik R1 2017 & SQL Server 2012.
Having a strange issue when configuring a report source.
1. Under Configure data connection choose an existing (good) data connection.
2. Click next and select 'Use as Shared Connection'
3. Click next and enter my SQL statement. The first statement is an @declare. Followed by some select statements to get the data. It's a fairly simple 6-table join (works in SSMS).
4. Open the query builder. Gives message 'The Declare SQL construct or statement is not supported.' Click Ok and then Execute Query. The same records are returned as when running the query in SSMS.
5. After configuring the data source and design time parameters I get to the preview screen.
6. Click Execute Query. Get message 'The variable name @CustomerNumber' has already been declared...' It's using the same parameters as step 4.
Questions:
In step #4 the SQL query runs in spite of the message 'The Declare SQL construct...'. Does this mean the query is Ok or not? If not Ok then why is data returned from the query builder? The SQL is valid in SSMS so I would expect the same to be used when in the designer. The message 'The Declare SQL construct...' is troubling as this is a normal part of SQL Server. So does the Telerik designer support the FULL implementation of SQL Server?
In step #6 the error message is misleading. The variable is only declared one time. How can I get past the error message?
Thanks,
Jim B
Any chance to have a responsive html report, I didn't find any responsive report in demos!
Thanks in advance