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
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 !
I created a report using Telerik Report Designer Standalone with sqlDataSource1 setup with the following ReportParameters like this:
C# coded that read that send the parameter as Int32
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
// set any deviceInfo settings if necessary
var deviceInfo = new System.Collections.Hashtable();
var reportSource = new Telerik.Reporting.UriReportSource();
var directory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
var value = Convert.ToInt32(numericExportarPdf.Value);
reportSource.Uri = "Report.trdp";
reportSource.Parameters.Add("NRO_TICKET", value);
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
if (result.HasErrors) return;
string fileName = result.DocumentName + "." + result.Extension;
string path = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
string filePath = Path.Combine(path, fileName);
using FileStream fs = new FileStream(filePath, FileMode.Create);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
Telerik.Reporting.Processing.CancelProcessingException: An error has occurred while processing the report. Processing canceled. Check the InnerException for more information.
---> System.Exception: Invalid value of report parameter 'NRO_TICKET'.
--- End of inner exception stack trace ---
at Telerik.Reporting.Processing.Report.ValidateParameters()
at Telerik.Reporting.Processing.Report.ProcessItem()
at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
at Telerik.Reporting.Processing.Report.ProcessElement()
at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)
at Telerik.Reporting.Processing.Report.Process(Boolean processItemActions, Boolean documentMapEnabled)
at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(Report report, IPathResolver pathResolver, IProcessingContext parentContext, IEnumerable`1 parameters, Key rootKey, Boolean interactivityEnabled, Boolean documentMapEnabled, PageLayoutInfo pageSettings, ErrorEventHandler errorHandler, List`1 documentNodes, Boolean& documentMapAvailable)
at Telerik.Reporting.Processing.ReportProcessor.ProcessResolvedReports(ResolvedReportDocument resolvedReportDocument, IList`1 parameters, IProcessingContext contextPerDocument, Boolean interactivityEnabled, Boolean documentMapEnabled, PageLayoutInfo pageSettings, List`1 processedReports, ErrorEventHandler errorHandler, List`1 documentNodes, Boolean& documentMapAvailable, ListSlice& tocReportsSlice)
at Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(ReportSource reportSource, IRenderingContext context)
at Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(ReportSource reportSource, Hashtable deviceInfo, IRenderingContext context)
at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
at Telerik.Reporting.Processing.ReportProcessor.<>c__DisplayClass47_0.<RenderReport>b__0(SingleStreamManager sm)
at Telerik.Reporting.Processing.ReportProcessor.RenderReportSafe(Func`2 renderCallback, String format, IRenderingContext renderingContext)
at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo, CancellationToken cancellationToken)
at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)
Hello,
Looking for a formula to get the previous Monday and Sunday dates for default report parameters. I assume something similar to this but cannot get figure it out.
Formula below is the last day of the year. I can't figure out how to make it previous Monday.
= Today().AddDays(CDbl(- Today().Day))
Thanks in advanced
Hello,
I have two questions,
Hi,
I would like to use/not use a parameter as a filter depending on the user entered value. If it's 0 then I want to ignore the filter.
Here is my configuration in report designer.
Essentially I want to achieve this:
SQL if parameter aualtranpstper= 0 then
pst_yer = parameter aualtranpstyer
SQL if parameter aualtranpstper<>0
pst_yer = parameter aualtranpstyer and pst_per = parameter aualtranpstper
What should my value column in this screen look like?
I posted the same question after reading here https://www.telerik.com/forums/conditional-filtering-and-to-skip-filter-on-empty-report-parameters#205578 but thought it better to create new question.
Thanks for your help.
AW
I have my SQL Server on Azure Virtual Machine. I'm trying to use Managed Identity Connection String (without the need of username, password in the connection string) to connect my SQL Server with Telerik Report. I did not find any specific documentation or a question regarding this implementation. Any leads will be appreciated.
I can connect my SQL Server using this normal connection string: Server=tcp:sqlserverendpoint,1234;Initial Catalog=SampleDatabase;Persist Security Info=False;User ID=username;Password=password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
I'm trying to use this Connection String (which doesn't include username and password): Server=tcp:sqlserverendpoint,1234;Authentication=ActiveDirectoryManagedIdentity;Encrypt=True;Database=SampleDatabase;
Any leads would be appreciated. Thanks.