private void detail_ItemDataBinding(object sender, EventArgs e)
{
// Get the detail section object from sender
Telerik.Reporting.Processing.DetailSection section = (Telerik.Reporting.Processing.DetailSection)sender;
// From the section object get the current DataRow
Telerik.Reporting.Processing.IDataObject dataObject = (Telerik.Reporting.Processing.IDataObject)section.DataObject;
object rowdata = (object)section.DataObject.RawData;
if ((dataObject["EEODStatement"] == null) || (dataObject["EEODStatement"].ToString().Length == 0))
{
Telerik.Reporting.Processing.Table table1 = (Telerik.Reporting.Processing.Table)section.ChildElements.Find("table1", true)[0];
// Here I want to access a particular tablerow object and hide it
}
}
Hello,
I am facing an error when I try to open a report which is located in .vb from my MVC View Reportviewer is this a compatibility issue can it be resolved please help!
Error creating report instance (Report = HMB2BReport.rptAirlineListPrint, HMB2BReport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null).
An error has occurred.
Invalid report type
Hello,
I'm having an issue displaying data on the report I have.
I am using ReportDesigner tool to create report file which I want to be rendered however, when If I add text =Fields.WeekStartDate or =Fields.Lines im not getting anything.
This what I have:
Report is rendered by using ReportResolverBase class method: ReportSource ResolveReport()
protected override ReportSource ResolveReport(string reportId)
{
return reportHelper.GetReportSource(reportId);
}
public ReportSource GetReportSource(string reportId)
{
var reportSource = new InstanceReportSource();
reportSource.ReportDocument = Telerik.Reporting.Report Report;
report.DataSource = new ObjectDataSource(model, null); // model structure below
}
var model = new List<
Foo
>();
class Foo {
public string WeekStartDate { get; set; }
public string Year { get; set; }
public string WeekOfTheYear { get; set; }
public IEnumerable<
Bar
> Lines { get; set; }
}
class Bar {
public string DueDate { get; set; }
public string EQCode { get; set; }
public string EQDescription { get; set; }
public string WSDescription{ get; set; }
}
My ultimate goal is to display Foo items on separate pages something like that:
DetailSection:
WeekStartDate ........................................ Year ....................... WeekOfTheYear............................
DueDate EQCode EQDescription WSDescription
DueDate EQCode EQDescription WSDescription
DueDate EQCode EQDescription WSDescription
DueDate EQCode EQDescription WSDescription (for each Line)
is there a way to achive that?
Thanks in advance!
Hi,this is my first time using Telerik Reporting and having some problems....
I added to my Solution a "Telerik Reporting Library R1 2018"
Then added a EDMX file with a couple of tables. Then add a Report "Report1.cs"
Using the Report Designer on Visual Studio:
1.- Add a Entitity DataSource (using the EDMX added before).
2.- Using a table wizard to see the rows of a Table.
When i Press "Preview" tab it shows this error:
Each table row and column maintains a minimum size, resulting in a minimum table
size of {Width=10px, Height=10px}.
And if I try to render it (using c#) to PDF the pdf shows this error too:
An error has occurred while processing Table 'table2':
An error has occurred while resolving 'entityDataSource1' data source: An error occurred while invoking data
retrieval method.
------------- InnerException -------------
No connection string named 'SAOO_ProductionEntities' could be found in the application config file.
But my application Config has the line with the
<
add
name
=
"SAOO_ProductionEntities"
..../>
So, wich is the problem? Telerik Reporting have been installed with the MSI package.
Thanks.
Hello, I'm using: Telerik Report Designer (Versión 8.2.14.2017). My issue:
I need to display every record to start on a new page, for example, if Item "1" needs 1.5 pages to be dispalyed, then the next Item "2" must start in page 3 (not in page 2) and so on...
I have a Group Header Section and also a Group Footer Section and they are working as espected.
I have tried a lot of combinations on PageBreak and Keep Together properties and is not working.
Regards, thanks for your help.
David
There is a way to customize the report with LINQ?
I did this but I made it work
public class ReportController : Controller
{
// GET: Report
public ActionResult Index()
{
Uri uri = HttpContext.Request.Url;
var changeReport = new ReportController().Identification(1, uri);
return View(new ReportModel() { TheReport = changeReport});
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl(Url.Content("~/api/reports"))
.TemplateUrl(Url.Content("~/Content/ReportViewer/templates/telerikReportViewerTemplate.html"))
.ReportSource(Model.TheReport)
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
.EnableAccessibility(false)
.Deferred()
)
//This is what I do
DBContext db = new DBContext();
var data = db.Patient.FirstOrDefault();
var name = data.FirstName + " " + data.LastName;
var txtName= ((Telerik.Reporting.TextBox)report.Items.Find("txtName", true)[0]);
txtName.Value = !string.IsNullOrEmpty(name) ? name.Trim() : empty;
// in asp.net webforms I did it this way and it worked
var instanceReportSource = new Telerik.Reporting.InstanceReportSource {ReportDocument = report};
ReportViewer.ReportSource = instanceReportSource;
ReportViewer.RefreshReport();
Does anyone know how to do this in asp.net mvc?
Hello, someone has some idea how to customize reporting
I do the following
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl(Url.Content("~/api/reports"))
.TemplateUrl(Url.Content("~/Content/ReportViewer/templates/telerikReportViewerTemplate.html"))
.ReportSource(Model.TheReport)
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
.EnableAccessibility(false)
.Deferred()
)
public class ReportController : Controller
{
// GET: Report
public ActionResult Index()
{
Uri uri = HttpContext.Request.Url;
var changeReport = new ReportController().Identification(1, uri);
return View(new ReportModel() { TheReport = changeReport});
}
// Controls
var txtName = ((Telerik.Reporting.TextBox)report.Items.Find("txtName ", true)[0]);
txtName.Value = !string.IsNullOrEmpty(name) ? name.Trim() : empty;
I'm using: Telerik Reporting Q1 2015 v9.0.15.422
I have some data that is duration information (TimeSpan to be specific). I want to show duration in h:mm:ss so that we can sum up durations in spreadsheet. However, I'm only able to show duration in hh:mm:ss format which can't be summed up in spreadsheet. Is there any way to show TimeSpan in h:mm:ss format?