Hi!
I am working on Telerik Reporting and I need to hide panels when the list I use by ObjectDataSource is empty. How can I handle it? Those blue are panels, and just below the lists. But they are not together, do I have to connect them by something like subreport? Do I have to write some code?
Thanks a lot!
Hi,
I'm trying to add reports to a report book and display the report book in a MVC project, but I haven't found a way to do it so far.
Here is the code behind sample
public ActionResult ReportBook()
{
ReportBook reportBook = new ReportBook();
reportBook.Reports.Add(new TelerikReporting.MissionPlanning());
Report report = new Report();
report.DataSource = new UriReportSource() { Uri = "TelerikReporting.AgencyList, TelerikReporting" };
reportBook.Reports.Add(report);
InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = reportBook;
return View("ReportBook", instanceReportSource);
}
and the view code
@model Telerik.Reporting.InstanceReportSource
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl("/api/reports/")
.TemplateUrl("/Reports/templates/telerikReportViewerTemplate-9.1.15.624.html")
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.ReportSource(Model)
)
This results in an empty report with a "No Report" message. I don't see what I'm doing wrong, it looks like the few samples I've found.
I've managed to display a single report by using a TypeReportSource instead of an InstanceReportSource, but that's not what I need...
I am using HTML5 Web Form REST Telerik Reporting Q1 2017. When setup the first report which is using the wizard the report and parameter working properly.
However when I tried to pass the parameter from Querystring (from other web form) the report parameter becomes Null.
Please help me, What is the best workaround or solution for this issue?
=======================================================================
On the Page_Load report viewer I get the value from Querystring :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RptQuot1 report = new RptQuot1(Request.QueryString["Parameter1"] as string);
}
}
On the report constructor I added the parameter "Parameter1"
public RptQuot1(string parameter1)
{
InitializeComponent();
this.DataSource = null;
this.ReportParameters["Parameter1"].Value = parameter1;
}
Also on that class I added the NeedDataSource event handler :
public void RptQuot1_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
this.sqlDataSource1.Parameters[0].Value = report.Parameters["Parameter1"].Value;
report.DataSource = this.sqlDataSource1;
}
| Imports Microsoft.VisualBasic | |
| Imports Telerik.Reporting.Processing | |
| Imports MyTelerikLibrary | |
| Public Class TelerikFunctions | |
| Inherits System.Web.UI.Page | |
| Public Function ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report) As Telerik.Reporting.Report | |
| Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor() | |
| Dim result As RenderingResult = reportProcessor.RenderReport("PDF", reportToExport, Nothing) | |
| Dim fileName As String = result.DocumentName + ".pdf" | |
| HttpContext.Current.Response.Clear() | |
| HttpContext.Current.Response.ContentType = result.MimeType | |
| HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Private) | |
| HttpContext.Current.Response.Expires = -1 | |
| HttpContext.Current.Response.Buffer = True | |
| HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName)) | |
| HttpContext.Current.Response.BinaryWrite(result.DocumentBytes) | |
| HttpContext.Current.Response.End() | |
| End Function | |
| End Class |
Imports MyTelerikLibrary
| Dim tF As New TelerikFunctions | |
| Dim rv = New RwpListingD007() | |
| tF.ExportToPDF(rv) | |
void ExportToPDF(Telerik.Reporting.ReportBook reportToExport) { var deviceInfo = new Hashtable(); ReportProcessor reportProcessor = new ReportProcessor(); RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, deviceInfo); ////Create filename for PDF if saved //string fileName = result.DocumentName + ".pdf"; Response.Clear(); Response.ContentType = result.MimeType; Response.Cache.SetCacheability(HttpCacheability.Private); Response.Expires = -1; Response.Buffer = true; ////Code for automatically save PDF report //Response.AddHeader("Content-Disposition", // string.Format("{0};FileName=\"{1}\"", // "attachment", // fileName)); Response.BinaryWrite(result.DocumentBytes); Response.End(); }Hi all,
I am a new user.
I want to know: How many the number of records maximun to telerik reporting can load or view?(Exam: 1 Million records)
Have a Telerik report that is generated in legal, landscape mode. Margins are set as well as the page properties however when running the report and attempt to print, the page is listed as Portrait and letter. How do I set the print properties of the report?
Also with this report all the data is in a table and when viewing the PDF, there are the table lines that continue on the bottom of the page (see image for illustration). How do I remove them? I understand they are problem from the table and due to the table continuing onto the next page, it displays the lines. I would like for the last record on the page to be just a straight line across.
Hi all,
I am a new user.
I want to know:
In table, limit the number of records in a report can load or view?
limit the number of columns in a table can view?