Hi,
Maybe you want me refer Assign connection string dynamically using report parameter and bindings - Telerik Reporting .I followed the solution, it didn't work . And then I set the 'ConnectionString' to '@ReportParameters.PFDSConnectionString', it also didn't work, even if I add the '.Value'.Pls refer the error.png
But when I set the connection string to the property 'ConnectionString' , it worked. And I tested the parameter rendering, it's also OK. Pls refer the success.png.
I think the C# code is OK. Because when I use the appsetting.json file to injec the connection string.
Set ConnectionString to 'AcosReportsConnection', It's OK too. Pls refer the appsettings.png.
Because now the connection string come from database depending on different input parameters, I need to set the connection string dynamically.
Now I am very confused.
Do you have any suggestiones? Thanks.
Hi there,
Does anyone have an idea why textboxes are not aligning properly in the preview mode?
Telerik Report Designer
Version: 17.2.23.1114
Target Framework: .NET Framework 4
Thank you.
Hey!
I have been using Telerik's Reporting and UI for MVC (version Q3 2018) for years without issues. I have just renewed my license and upgraded to the most recent release, both reporting and MVC. A lot has changed and lots of stuff got broken after the upgrade. I have been correcting it for the last weeks (it's a big project).
But Telerik Reporting is giving me the most headaches. After the upgrade, all pages with reports stopped working. I had met every requirement, but were still receiving "Cannot access the Reporting REST service. (serviceUrl = '/api/reports'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)".
I tested the endpoint '/api/reports/formats', and it failed with some internal errors. I then removed the section <Telerik.Reporting> from my Web.Config file and now it correctly returns a json it a bunch of formats.
Sadly, when I try to open a page with a report I still get "Canno/t access the Reporting REST service..." error. Looking in the browser's network tab I see a request to '/api/reports/version' with a 404 status. I tried opening it manually and got the same 404 error (please remember that /api/reports/formats is working fine!).
I've spent several hours trying to solve this issue but no luck.
If it helps, here's what's being loaded on the HTML page:
<link href="/Content/bootstrap.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/7.2.0/classic/classic-silver.css" />
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />
<script src="/Scripts/jquery-1.9.1.js"></script>
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="/Scripts/kendo/2024.1.130/pako_deflate.min.js"></script>
<script src="/Scripts/kendo/2024.1.130/kendo.all.min.js"></script>
<script src="/Scripts/kendo/2024.1.130/kendo.aspnetmvc.min.js"></script>
<script src="/Scripts/kendo/2024.1.130/cultures/kendo.culture.pt-BR.min.js"></script>
<script src="/Scripts/kendo/2024.1.130/messages/kendo.messages.pt-BR.min.js"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.min.js"></script>
<script src="/Scripts/modernizr-2.5.3.js"></script>
<script src="/Scripts/bootstrap.min.js"></script>
<script src="/ReportViewer/js/telerikReportViewer.kendo-18.0.24.130.min.js"></script>
<script src="/ReportViewer/js/telerikReportViewer-18.0.24.130.min.js"></script>
<script src="/ReportViewer/js/localization.pt-BR.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#reportViewer1")
.telerik_ReportViewer({
// The URL of the service which will serve reports.
// The URL corresponds to the name of the controller class (ReportsController).
// For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
serviceUrl: "/api/reports",
// The URL for custom report viewer template. The template can be edited -
// new functionalities can be added and unneeded ones can be removed.
// For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
//
//ReportSource - report description
reportSource: {
// The report can be set to a report file name (trdx report definition)
// or CLR type name (report class definition).
report: "Mantic.Core.Web.Reports.CancelledSales.CancelledSalesReport, Mantic.Core.Web.Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
},
// Specifies whether the viewer is in interactive or print preview mode.
// PRINT_PREVIEW - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
// INTERACTIVE - Displays the report in its original width and height without paging. Additionally interactivity is enabled.
viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
// Sets the scale mode of the viewer.
// Three modes exist currently:
// FIT_PAGE - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
// FIT_PAGE_WIDTH - The report will be zoomed in or out so that the width of the screen and the width of the report match.
// SPECIFIC - Uses the scale to zoom in and out the report.
scaleMode: telerikReportViewer.ScaleModes.FIT_PAGE_WIDTH,
// Zoom in and out the report using the scale
// 1.0 is equal to 100%, i.e. the original size of the report
scale: 1.0,
ready: function () {
//this.refreshReport();
},
});
});
</script>
And Here is my ReportsController:
namespace Mantic.Core.Web.Views.Report.Controllers
{
using System.IO;
using System.Web;
using System.Web.Mvc;
using Telerik.Reporting.Cache.File;
using Telerik.Reporting.Services;
using Telerik.Reporting.Services.WebApi;
//The class name determines the service URL.
//ReportsController class name defines /api/report/ service URL.
public class ReportsController : ReportsControllerBase
{
static ReportServiceConfiguration configurationInstance;
static ReportsController()
{
//This is the folder that contains the report definitions
//In this case this is the Reports folder
var appPath = HttpContext.Current.Server.MapPath("~/");
var reportsPath = Path.Combine(appPath, "Reports");
//Add resolver for trdx/trdp report definitions,
//then add resolver for class report definitions as fallback resolver;
//finally create the resolver and use it in the ReportServiceConfiguration instance.
var resolver = new ReportFileResolver(reportsPath)
.AddFallbackResolver(new ReportTypeResolver());
//Setup the ReportServiceConfiguration
configurationInstance = new ReportServiceConfiguration
{
HostAppId = "Html5App",
Storage = new FileStorage(),
ReportResolver = resolver,
// ReportSharingTimeout = 0,
// ClientSessionTimeout = 15,
};
}
public ReportsController()
{
//Initialize the service configuration
this.ReportServiceConfiguration = configurationInstance;
}
}
}
PS: For upgrading UI for MVC, I've found a guide with breaking changes for each version (that had it) and it made the corrections easier, but I have not found one for the Telerik Reporting.
Hello,
Requesting to please let us know at the earliest.
Thanks
Fiyaz Ahmed
I have a report catalog of 20 some reports
I pass a parameter to the report cataglog ie RanchID
My parameter shows up on the report catalog header
I need to pass that same parameter to the report I launch from the catalog.
Thank you
I use Telerik Reporting Rest Service from Telerik template. I have created a Postgresql source in Report Disigner but I couldnt to connection in TelerikReportRestService.
Im using trial version.
Hi,
We have a requirement to create a report using the "Standalone Report Designer". We just want to open the standalone reporting tool from our desktop application at a button click and allow user to create their own reports. For that we have to pass the content of the report from the desktop application to the standalone tool. We tried to pass the argument in "Process.Start" Method. But we got an error message as in the attached image.
Could you please help us to work on the standalone Report Designer tool with C# WPF desktop application?
We want to know how the below items will be work.
1) How to open the standalone report designer programmatically (C#)?
2) How to pass the content from C# to the tool?
Thank You !