<
telerik:ReportViewer
>
component in the .aspx file.
This is an example of a DataObjectMethod that I'm using for the report.
[DataObjectMethod(DataObjectMethodType.Select)]
public Dictionary<
DateTime
, int> GetContactTotals(string connStr)
{
var bllCont = new BLLTotals(connStr);
return bllCont.GetContactTotalsPerMonth();
}
It will build and display data fine when I pass in a default connection string in the Report Designer, however I want to be able dynamically change the connection string at runtime for the report as it will be using different customer databases. I've tried adding a Report Parameter in the Report Designer, as well as adding a parameter to the Report Viewer component in the .aspx file and setting it from code behind, however I just can't get it to work.
Is there something I'm missing? Or would this be the correct way to approach this type of problem.
I want to give top margin on each page except first page. How can I achieve this?
My current approach is that I gave top margin to PageHeader section and trying to hide PageHeader section on specific pages. But I failed because it hides PageHeader on all pages.
Please suggest.
Thanks
Scenario: We are printing a financial transaction report from an odata service. The query is very large because the user entered a query that requests too many records. Now I want to cancel the report because it is taking too long to generate. How can we cancel the report? (Canceling the report should cancel odata request as well).
Odata uses cancellation tokens to cancel. See: https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netframework-4.8
Here is one post to cancel report, but it's solved: See: https://www.telerik.com/forums/cancel-report-generation
Is there going to be any support for C# Dynamic's?
I am working on a multi-language report and there is no easy way to add multi-language to your reports.
The easyest way for me is to work with dynamics but the Telerik ReportDesinger isn't those properties.
Hi,
I am attempting to use the standalone report designer with an Object DataSource that returns ExpandoObject. I have been following this example to provide a custom type description provider for ExpandoObject:
http://www.telerik.com/support/kb/reporting/details/how-to-use-objectdatasource-with-expandoobject
However, I am having trouble getting this to work with the standalone designer. I cannot think of a way to get the custom type description provider registered when running in the context of the standalone designer. Is there a way to accomplish this (maybe through configuration)?
Thanks!
-Kevin
Hello,
I have a report with a two column layout, a header and a footer.
I need an summery on the last page, like the "Report Footer". The problem with the report footer is that it wil be only in 1 column, and i need it across the entire page (like the layout i added).
How can i archieve this? Adding it to the footer didn't work out, since it height cannot be changed dynamically.
Greetings,
Jelke
The problem is reported to Microsoft Visual Studio team to look it on their side at Developer Community Forums. We are also working on this and we will release fix with one of our next releases.
Issue :
When report is exported from code, the textbox which displays invoice date do not format the date correctly, The format is set to {0:D}, the result is 01/May/2019 12:00:00 AM.
When same report is exported from report viewer , the date is formatted correctly, i.e. Monday, April 1, 2019
Below is code to export report from code.
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new
Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo =
new
System.Collections.Hashtable();
Telerik.Reporting.TypeReportSource typeReportSource =
new
Telerik.Reporting.TypeReportSource();
typeReportSource.TypeName =
typeof
(FCInvoiceHeader).AssemblyQualifiedName;
typeReportSource.Parameters.Add(
"OrderNumber"
, header.InvoiceNumber);
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(
"PDF"
, typeReportSource, deviceInfo);
string
fileName = header.InvoiceNumber +
"."
+ result.Extension;
string
path = @
"C:\FleetCareBulkInvoice\"
;
bool
exists = System.IO.Directory.Exists(path);
if
(!exists)
System.IO.Directory.CreateDirectory(path);
string
filePath = System.IO.Path.Combine(path, fileName);
using
(System.IO.FileStream fs =
new
System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}