I have created a report in the standalone report designer R2 2017. I previews perfectly. The problem is when I try to use the report viewer in my C# windows forms Desktop Application, (Visual Studio 2015 Community edition). The problem is something to do with the report source value. The relevant code I am using is:
private void reportViewer1_Load(object sender, EventArgs e)
{
var typeReportSource = new Telerik.Reporting.TypeReportSource();
typeReportSource.TypeName = "F:\\Work\\OnTarget2015\\Reports\\Report1";
Telerik.ReportViewer.WinForms.ReportViewer reportViewer1;
reportViewer1 = new ReportViewer();
reportViewer1.ReportSource = typeReportSource;
reportViewer1.ReportSource.Parameters.Add(new Telerik.Reporting.Parameter(name: "StartDate", value: "1/1/2017"));
reportViewer1.ReportSource.Parameters.Add(new Telerik.Reporting.Parameter(name: "EndDate", value: "8/1/2017"));
this.reportViewer1.RefreshReport();
}
Private Sub PrintReport(ByVal report As Telerik.Reporting.Report)
Dim printerSettings As New System.Drawing.Printing.PrinterSettings
' The standard print controller comes with no UI
Dim standardPrintController As New System.Drawing.Printing.StandardPrintController
' Print the report using the custom print controller
Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor
reportProcessor.PrintController = standardPrintController
reportProcessor.PrintReport(report, printerSettings)
End Sub
I have a set of pie charts in a report. The size of the pie charts ends up being different based on the label sizes. a larger label will generate a smaller chart. a smaller label will generate a larger chart. How can I make the size of the charts uniform regardless of label size.
I have tried to set the padding under the chart Style as well as the padding under the chart PlotAreaStyle. Setting the padding on the chart Style did decrease the size of the charts but it decreased them all by the same amount and they are still different sizes.
Hi,
I hope anyone can help me on this as my situation is very urgent. If you can see on the attached file, that is the shape that I want to make. So I decided to use the polygon shape which is available in telerik. Below is my sample code :
Telerik.Reporting.Shape polygonShape = new Telerik.Reporting.Shape();
PolygonShape seriesofPolygonShapePoints = new PolygonShape(8,0,0);
PointF[] seriesofPoints = new PointF[8];
seriesofPoints[0] = new PointF(-10,10);
seriesofPoints[1] = new PointF(-10, 4);
seriesofPoints[2] = new PointF(-12, 4);
seriesofPoints[3] = new PointF(-12, 0);
seriesofPoints[4] = new PointF(12, 0);
seriesofPoints[5] = new PointF(12, 4);
seriesofPoints[6] = new PointF(10, 4);
seriesofPoints[7] = new PointF(10, 10);
seriesofPolygonShapePoints.AddLines(points, true);
#region create custom polygon shape
polygonShape = new Telerik.Reporting.Shape
{
ShapeType = seriesofPolygonShapePoints,
Size = new SizeU(
Unit.Inch(.10),
Unit.Inch(.10)),
Stretch = true,
Location = new PointU(
Unit.Inch(coordinateViewModel.LocationOfX),
Unit.Inch(coordinateViewModel.LocationOfY)),
Style = {
BackgroundColor = backgroundColor,
Color = color,
LineWidth = lineWidth
}
};
#endregion
#region add to section
detailSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
polygonShape,
});
#endregion
With the above code, the report runs but it doesn't draw properly. It draws the default octagon shape since it has eight side. BUT what I want is the image I attached should display since I provided the points where the line should draw.
I don't know if im missing something in the code or am I missing the points that I need to add to draw the shape properly..
Hope someone can help me immediately..
Thanks!!!
I've faced a problem in the reporting. Sometime the telerik report not showing it's navigation bar. So, I can't download the report file and can't zoom the report. I've marked the navigation bar for better understanding. Sometime the navigation bar show and sometimes disappear.
Now, I want to know how to solved this problem.
I've checked the Developer Tools (Network tab). Everything is fine and loading.
I've added the network tab, element tab and the report. In the report I've marked the navigation bar which is not showing.
Thanks in advance.
I have a report that is a report of items contained in a package.
The data source for this report is from SQL.
I have a field called Fields.PackageID, which in this example is 157893. It will always be a unique number. When I put this field in a textbox, it displays properly. When I put this field into a barcode with font 3 of 9 and scan it, the output is 157893X. Where X is a random letter. Some packages that I scan will give me an S or a P at the end. It varies. Before switching my report to telerik reporting, everything worked as intended.
Is there a way to troubleshoot this?
I thought about just shortening the string length by 1 using (ScannedNumber = ScannedNumber.Remove(ScannedNumber.Length - 1)) but when my package count goes into the 7 digit realm, it will start to cause issues. And we also scan other numbers with the program for products.
Thanks!
chartCS_HW_Quontity.IntelligentLabelsEnabled =
false;
chartCS_HW_Quontity.ChartTitle.TextBlock.Text = "Title Text";
reportAccess.getTotHWMachine(loc, dept, projid).ToString();
chartCS_HW_Quontity.PlotArea.Appearance.Border.Width = 0F;
chartCS_HW_Quontity.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.
Color.Transparent;
chartCS_HW_Quontity.PlotArea.Appearance.FillStyle.SecondColor = System.Drawing.
Color.Transparent;
chartCS_HW_Quontity.Legend.Appearance.Border.Visible =
false;ChartSeries serie = new ChartSeries();
serie.Type =
ChartSeriesType.Pie;
serie.Clear();
serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.
ChartSeriesLegendDisplayMode.ItemLabels;
DataTable dt = new DataTable();
dt = reportModel.getQuontityOfHW(loc, dept, projid);
for (int i = 0; i < dt.Rows.Count ; i++)
{
ChartSeriesItem item = new ChartSeriesItem();
item.YValue =
Convert.ToDouble(dt.Rows[i]["count"].ToString());
item.Name = dt.Rows[i][
"papersize"].ToString();
item.Appearance.Exploded =
true;
item.Label.TextBlock.Text =
/*dt.Rows[i]["papersize"].ToString() +*/ "#%";
item.Appearance.FillStyle.FillType =
FillType.Solid;
if (i==0)
item.Appearance.FillStyle.MainColor =
Color.FromArgb(79,129,189);// Color.Blue;
if (i == 1)
item.Appearance.FillStyle.MainColor =
Color.FromArgb(192, 80, 77);
if (i == 2)
item.Appearance.FillStyle.MainColor =
Color.FromArgb(155, 187, 89);
if (i == 3)
item.Appearance.FillStyle.MainColor =
Color.FromArgb(128, 100, 162);
item.Label.TextBlock.Appearance.TextProperties.Color =
Color.Black;
serie.Items.Add(item);
}
chartCS_HW_Quontity.Series.Add(serie);
Hi. I'm wondering if it's possible to get access to the fields, textboxes, etc. on a standalone report after it's been rendered and placed onto report pages.
When a report is printed, I need to know which specific groups on the report are being printed so that I can set a Printed flag for the order that just had it's Order Confirmation printed. I can get the page numbers which were just printed, but now I need to know which page(s) the groups were rendered on.
Thanks for your time.
I'm using the True Print option, it works great, the problem is the printed content itself, the margins are off and thus part of the content is missing (see attached image).
When I open and print the same file using the Adobe Reader program the content is as fine.
Can something be done to prevent this from happening when printing from Chrome?