I have a ridiculously simple graph I want to build. The data source works fine, and returns 2 columns: a "bin" (number from 0 to N) and a "count". So the data looks like this:
BagActivityAfterXDays, Count
0, 35
1, 20
2, 5
3, 0
I used the wizard to build the chart like this:
But this is all I get, in designer or preview, with no context as to what on earth is going on:
Please help - I'm stuck in the mud and can't figure out what is wrong, or how to fix it.
I need to display large amounts of text in side by side columns that flow from the bottom of one to the top of the next one, and continue onto a following page. Is it possible? I'm including a diagram to explain what I mean.
I have a PDF report to create.. Its usually 2 pages long and contains the information for a single record. It is generated by manual selection one record at a time. It already includes a sub-report with multiple child entities related to the parent record.
The thing is the parent record contains 134 fields. I've got these split into multiple related panels currently
For maintainability, is it easier to split the panels into sub-reports? Is there any performance issue with that? Although only 1 report is selected at a time.
I find that when I have to make a change the desktop report designer isn't very user friendly when panels need to be moved down to expand a prior panel.
Or am I just not familiar with the designer enough to more things around efficiently?
I have a report that's basically an export of a SQL View.
Parameters are passed in to filter the view based on Venue and a range of Event Date (i.e.: EventDate between (@StartDate) and (@EndDate)
The report is rendered correctly, except that I cannot get a page number using
= PageNumber("detailSection1", Fields.Venue) + " of " + PageCount("detailSection1", Fields.Venue)
It appears that this will only work if there is something in detailSection1. Only thing there is the table.
If I add Fields.Venue into detailSection1, I get that page # and count, but the problem is that I get one page for each row in the view since Venue is part of it.
I tried this with no luck = PageNumber("VenueSummaryTable", Fields.Venue) + " of " + PageCount("VenueSummaryTable", Fields.Venue)
So, how do I get the table to only appear once and be able to get the page # and page count?
I'm configuring a custom format for a SQL datasource using Telerik (desktop) Report Designer v14.2.21.115.
I create the custom format for a date field as such
I click OK and when I preview the report I get an error "Input string was not in a correct format". Looking at the custom format settings again, the value type changes back to numeric as below
Why does the Value Type change back to Numeric?
A similar issue occurs with CallTime when I format it as HH:mm
The property for the fields do contain the appropriate format values
How does parameter binding in the HTML reporting control - when using report parameters and datasource parameters.
I have a file that works 100% in the designer - where the report parameters are linked to the datasource parameters ( FWIW - using postgres so no name parameters - they are ? in the query source).
I have 2 parameters per query... and they are bound to the Report parameters.
So each query has a section like this in the designer.
I am using the reports controller to return the report to the client... but when using the html version - the parameter binding doesn't seem to work and this i end up with syntax errors - as it looks like the ? is never replaced in the query.
The report parameters section renders fine.. and will match what i set via the parameters object.
Using fiddler i can see the post to the below URL setting my param to the values I choose..
http://localhost/reporting/api/reports/clients/cabb01e7aa1/parameters
But the query still fails with syntax error ( that doesn't happen in the designer).
I was hoping to leave "parameters" blank - since I dont want to set them independently of the reports parameters section.
If I leave it blank... the post to http://localhost/reporting/api/reports/clients/acb333b0fd4/instances shows the default parameters from the parameters area... but i still get syntax error.
We are serving the report via a custom resolver returning the actual trdx file... and it does contain the section i expect - which maps report parameter to query parameter...
I don't know how to resolve or move forward - any advise on how to resolve or what else i can post to try and assist diagnosing the issue ?
Steve
I am a newbi to Telerik.Reporting, and wants to understand how CsvDataSource is connected to the Report.
If I want to add two DataSources:
Source1:
MyCompanyId Name address ..... accountnumbers ..... <-- meta data for the heading of an invoice
Source2:
CustNum Name Address ...... etc <-- these are meta data for the customer
Source3:
CustNum OrderNum ItemNum <-- these are the details of the report
How should I do this? I understand that if I put everyting on each line of Source3, it will work, but then I add a lot of unnesseary data..
I could probably add a Type: H for header and R for row on Source3 so that I only need to add an empty space for each of the header data, but that also seems kind of ....
What will be the best way of doing this?
What if I use Json? Would that be easier? and if so, how?
Hi everyone,
We have several problems when we run reports in Linux environment.
1. The main problem is related Style and ExternalStyleSheets. Look at the picture below to see differences:
In windows environment (pic#1) report header part (report name, company name) shows correctly and style & external style sheets applied. BUT, in Linux environment (pic#2) it shows incorrectly, style is not applied. There are issues with text position (aligned to left), font size and other font properties.
2. Another issue is in Linux some texts are wrapped:
3. We also cannot create table programmatically. Since when we create a table programmatically, we trying to set properties like Font, Size.
See attached file to compare 2 pdf files of sample report which were exported in Windows and Linux.
We are planning to use our app in Linux and our project based on .NET6. How do you suggest to avoid those issues in Linux?
We recently started receiving complaints from clients who have been creating increasingly large reports, in the area of 50,000 to 75,000 records. In order to rule out our data, I created a test report using the same code we have to create our actual reports, but only create data from a POCO class. When running this test report, the output from RenderReport is extremely fast for record sets under a few thousand rows, but becomes very slow for record sets 50,000 to 75,000 rows. With our data, a 75,000 record report will take over an hour. Here are the times observed processing CSV and PDF report types with the test data and code below:
1000: *** Render Report #0 DONE in 00:00:00.1581774 ***
5000: *** Render Report #0 DONE in 00:00:02.6023945 ***
10000: *** Render Report #0 DONE in 00:00:11.0991098 ***
50000: *** Render Report #0 DONE in 00:10:20.2986525 ***
75000: *** Render Report #0 DONE in 00:21:37.1953330 ***
Here is the code I am using to run the tests. Please advise if there is a better alternative, but please keep in mind that this code currently ties into our user interface to produce a variety of different report types. Thanks for any insight.
private Table _MainTable;
private Unit PageWidth = new Unit(11, UnitType.Inch);
private Unit PageHeight = new Unit(8.5, UnitType.Inch);
private Unit ItemHeight = new Unit(.25, UnitType.Inch);
private Unit TenPointFont = new Unit(10, UnitType.Point);
private Unit TableWidth;
public class TestReportObject
{
public int? RowID { get; set; }
public string Description { get; set; }
public string LongDescription { get; set; }
}
private void AddTestColumn(int colIndex, string header, string fieldName, Unit colWidth)
{
TableGroup tableGroupColumn = new TableGroup();
_MainTable.ColumnGroups.Add(tableGroupColumn);
_MainTable.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(colWidth));
Telerik.Reporting.TextBox columnHeaderTextBox;
Telerik.Reporting.TextBox cellTextBox;
columnHeaderTextBox = new Telerik.Reporting.TextBox();
columnHeaderTextBox.Style.BackgroundColor = Color.LemonChiffon;
columnHeaderTextBox.Style.BorderStyle.Default = BorderType.Solid;
string name = header;
columnHeaderTextBox.Value = name;
columnHeaderTextBox.Name = name;
columnHeaderTextBox.Size = new SizeU(colWidth, ItemHeight);
columnHeaderTextBox.Style.Font.Size = TenPointFont;
columnHeaderTextBox.Style.TextAlign = HorizontalAlign.Center;
tableGroupColumn.ReportItem = columnHeaderTextBox;
columnHeaderTextBox.TextWrap = true;
columnHeaderTextBox.Height = ItemHeight;
_MainTable.Items.Add((ReportItemBase)columnHeaderTextBox);
cellTextBox = new Telerik.Reporting.TextBox();
cellTextBox.Style.BorderColor.Default = Color.Black;
cellTextBox.Style.BorderStyle.Default = BorderType.Solid;
cellTextBox.Value = $"=Fields.{fieldName}";
cellTextBox.Name = name;
cellTextBox.Size = new SizeU(colWidth, ItemHeight);
cellTextBox.Style.TextAlign = HorizontalAlign.Left;
cellTextBox.Style.Font.Size = TenPointFont;
cellTextBox.Style.VerticalAlign = VerticalAlign.Middle;
cellTextBox.Height = ItemHeight;
cellTextBox.TextWrap = true;
_MainTable.Body.SetCellContent(0, colIndex, cellTextBox);
}
private Telerik.Reporting.Report BuildTestReport()
{
Telerik.Reporting.Report TestReport = new Report();
#region page settings (making the assumption of landscaped 8.5 x 11 paper)
TestReport.PageSettings.Landscape = true;
TestReport.PageSettings.PaperSize = new SizeU(PageWidth, PageHeight);
double BottomMarginSize = ExportParameters.BottomMargin == null ? .5 : ExportParameters.BottomMargin.Value;
TestReport.PageSettings.Margins.Bottom = new Unit(BottomMarginSize, UnitType.Inch);
double LeftMarginSize = ExportParameters.LeftMargin == null ? 1 : ExportParameters.LeftMargin.Value;
TestReport.PageSettings.Margins.Left = new Unit(LeftMarginSize, UnitType.Inch);
double RightMarginSize = ExportParameters.RightMargin == null ? 1 : ExportParameters.RightMargin.Value;
TestReport.PageSettings.Margins.Right = new Unit(RightMarginSize, UnitType.Inch);
double TopMarginSize = ExportParameters.TopMargin == null ? .5 : ExportParameters.TopMargin.Value;
TestReport.PageSettings.Margins.Top = new Unit(TopMarginSize, UnitType.Inch);
TableWidth = PageWidth - (new Unit(LeftMarginSize + RightMarginSize, UnitType.Inch));
#endregion
Unit remainingPageWidth = TableWidth;
Unit fullTableWidth = new Unit(11, UnitType.Inch);
_MainTable = new Table();
_MainTable.Location = new PointU(new Unit(0, UnitType.Inch), new Unit(0, UnitType.Inch));
_MainTable.Size = new SizeU(fullTableWidth, ItemHeight);
// Body
DetailSection ExportDetail = new DetailSection();
int RowCountTotal = 50000;
var rowList = new List<TestReportObject>();
for (int rows = 0; rows < RowCountTotal; rows++)
{
var reportObj = new TestReportObject();
reportObj.RowID = rows;
reportObj.Description = $"Row {rows}";
reportObj.LongDescription = $"This is the long description for row {rows}";
rowList.Add(reportObj);
}
_MainTable.DataSource = rowList;
_MainTable.Style.VerticalAlign = VerticalAlign.Middle;
_MainTable.ColumnHeadersPrintOnEveryPage = true;
_MainTable.Name = "mainTable";
// default grouping has to be added to allow data to appear
Telerik.Reporting.TableGroup tableGroup = new Telerik.Reporting.TableGroup();
tableGroup.Groupings.AddRange(new Telerik.Reporting.Grouping[] { new Telerik.Reporting.Grouping("") });
tableGroup.Name = "DetailGroup";
_MainTable.RowGroups.Add(tableGroup);
#region Define columns and cells within the main table
Unit theColumnWidth = _MainTable.Width / 3; // number of columns
AddTestColumn(0, "Row ID", "RowID", theColumnWidth);
AddTestColumn(1, "Description", "Description", theColumnWidth);
AddTestColumn(2, "Long Description", "LongDescription", theColumnWidth);
#endregion
ExportDetail.Items.AddRange(new ReportItemBase[] { _MainTable });
TestReport.Items.Add((ReportItemBase)ExportDetail);
return TestReport;
}
/// <summary>
/// Generates the bytes of the export file
/// </summary>
private byte[] ExportBytes()
{
Report rpt = BuildTestReport();
InstanceReportSource rptSource = new InstanceReportSource();
rptSource.ReportDocument = rpt;
using (new ContextScope(new Hashtable()))
{
Hashtable deviceInfo = new Hashtable();
deviceInfo["FontEmbedding"] = "Subset";
Telerik.Reporting.Processing.ReportProcessor RP = new Telerik.Reporting.Processing.ReportProcessor();
// ExportFileTypeString is UI selection, pdf, csv, etc.
byte[] buffer = RP.RenderReport(ExportFileTypeString, rptSource, deviceInfo).DocumentBytes;
return buffer;
}
}
I have a .Net 6 Blazor server side project that uses the Telerik Reporting and I'm trying to upgrade it to work with Blazor 3.0.0. When I use it with the latest Bootstrap theme by loading <link rel="stylesheet" href="https://unpkg.com/@@progress/kendo-theme-default@latest/dist/all.css" /> in my _Layouts.cshtml file the export functionality does not work. I followed the link to this theme and it is version 5.1.1. I went through the example of using the report viewer and I noticed that in the page configured with the report viewer that a stylesheet of <link rel="stylesheet" href="https://unpkg.com/@@progress/kendo-theme-default@4.26.0/dist/all.css" /> is being loaded. I went to the Bootstrap website and noticed that when going from version 4 to version 5 that jQuery has been replaced by JavaScript by default. Since the report viewer is using jQuery is this the problem?
The export functionality works when using the 4.26.0 version but it also changes the theme from the one loaded in the _Layouts.cshtml file.
Please advise how to resolve this issue.
Thanks in advance.
Carl