/// <summary>/// Barcodes generieren und anzeigen. Legt zusätzlich den angezeigten Titel fest und stellt Enabled auf true./// </summary>/// <param name="titel">Anzuzeigender Titel</param>/// <param name="barcodeItems">Zu erstellende Barcodes</param>/// <param name="target">ReportViewer, der als Ausgabe verwendet werden soll</param>public static void DisplayBarcodes(Telerik.ReportViewer.WinForms.ReportViewer target, string titel, IEnumerable<ReportItem> barcodeItems) { DefaultUserPresentationReport templateOfReport = null; InstanceReportSource instance = null; bool newReport = false; if (target.ReportSource != null) { instance = (target.ReportSource as InstanceReportSource); if (instance != null && instance.ReportDocument != null) { templateOfReport = instance.ReportDocument as DefaultUserPresentationReport; } } else { templateOfReport = new DefaultUserPresentationReport(); newReport = true; } templateOfReport.DocumentName = titel; //Aufgrund der Performance, werden die Bilder an die tatsächliche Größe angepasst // Zielgröße bestimmen Size sizeOfItemImage_Pixel = templateOfReport.ThumbnailSize; // A list with barcodeItems and an image List<ReportItem> barcodeListe = barcodeItems.ToList(); // Resize images to preview size for (int i = 0; i < barcodeListe.Count; i++) { if (barcodeListe[i].Bild != null) { // wrong size images only! if (barcodeListe[i].Bild.PhysicalDimension.Width != sizeOfItemImage_Pixel.Width || barcodeListe[i].Bild.PhysicalDimension.Height != sizeOfItemImage_Pixel.Height) { var newImageForReport = new Bitmap(barcodeListe[i].Bild, sizeOfItemImage_Pixel); // free old ram space! barcodeListe[i].Bild.Dispose(); barcodeListe[i].Bild = null; barcodeListe[i].Bild = newImageForReport; } } } target.Enabled = true; // set report title templateOfReport.Title = titel; // set source of template report to items templateOfReport.SetItemsToPrint(barcodeListe); if (newReport) { target.ReportSource = new InstanceReportSource() { ReportDocument = templateOfReport }; } else { target.ReportSource = instance; } // render start! fromMethod = true; // ! During this step suddenly 3 messages prompt target.RefreshReport(); fromMethod = false; }| Audited | Audited | Audited | Un-audited | |
| BALANCE SHEET | Mar-08 | Mar-09 | Mar-10 | Mar-11 |
| NET FIXED ASSETS | 23 159 616 | 24 968 321 | 24 352 332 | 23 198 353 |
| DEFERRED ASSETS | 0 | 0 | 0 | 0 |
| INTANGIBLE ASSETS | 0 | 0 | 0 | 0 |
| OTHER ASSETS | 50 000 | 50 000 | 50 000 | 50 000 |
| TOTAL NON CURRENT ASSETS | 23 209 616 | 25 018 321 | 24 402 332 | 23 248 353 |
| CASH | 36 354 | 80 101 | 148 987 | 521 611 |
| ACCOUNTS RECEIVABLE | 11 756 559 | 11 365 227 | 9 223 685 | 7 562 145 |
| INVENTORY | 4 708 984 | 4 269 738 | 3 941 538 | 4 613 054 |
| OTHER CURRENT ASSETS | 51 478 | 0 | 0 | 0 |
| TOTAL CURRENT ASSETS | 16 553 375 | 15 715 066 | 13 314 210 | 12 696 810 |
| TOTAL ASSETS | 39 762 991 | 40 733 387 | 37 716 542 | 35 945 163 |
| LONG TERM DEFERRED TAXES | 3 054 804 | 4 889 626 | 3 058 807 | 3 017 438 |
| LOANS FROM SUBSIDARIES | 0 | 0 | 0 | 0 |
| SENIOR LONG TERM DEBT | 106 862 | 132 275 | 64 002 | 23 208 |
| LOANS FROM SHAREHOLDERS/DIRECTORS | 0 | 0 | 0 | 0 |
| SUBORDINATED DEBT | 0 | 0 | 0 | 0 |
| OTHER LONG TERM LIAB | 0 | 0 | 0 | 0 |
| PENSION PROVISIONS | 0 | 0 | 0 | 0 |
| OTHER PROVISIONS | 0 | 0 | 0 | 0 |
| TOTAL NON CURRENT LIABILITIES | 3 161 666 | 5 021 901 | 3 122 809 | 3 040 646 |
| SHORT TERM DEBT | 6 490 204 | 3 134 461 | 760 328 | 0 |
| ACCOUNTS PAYABLE | 4 916 314 | 5 443 842 | 7 549 264 | 6 847 010 |
| TAXES PAYABLE | 0 | 80 553 | 327 398 | 344 951 |
| CURR MAT OF LONG TERM DEBT | 115 259 | 111 210 | 72 718 | 35 740 |
| OTHER CURRENT LIABS | 102 974 | 488 242 | 0 | 26 436 |
| TOTAL CURRENT LIABILITIES | 11 624 751 | 9 258 308 | 8 709 708 | 7 254 137 |
| TOTAL LIABILITIES | 14 786 417 | 14 280 209 | 11 832 517 | 10 294 783 |
| SHAREHOLDER'S FUNDS | 24 976 574 | 26 453 178 | 25 884 025 | 25 650 380 |
| MINORITY INTEREST | 0 | 0 | 0 | 0 |
| TOTAL EQUITY | 24 976 574 | 26 453 178 | 25 884 025 | 25 650 380 |
| TOTAL LIABS AND EQUITY | 39 762 991 | 40 733 387 | 37 716 542 | 35 945 163 |
| BS TEST (S/B 0) | 0 | 0 | 0 | 0 |
| Mar-08 | Mar-09 | Mar-10 | Mar-11 |
Private Sub DetailSection1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailSection1.ItemDataBound
Dim section As Processing.DetailSection = TryCast(sender, Processing.DetailSection)
Dim typeText As Processing.ReportItemBase = section.Items.Find("txtType", False)(0)
Dim mfgText As Processing.ReportItemBase = section.Items.Find("txtMFG", False)(0)
Dim catalogText As Processing.ReportItemBase = section.Items.Find("txtCatalog", False)(0)
Dim qtyText As Processing.ReportItemBase = section.Items.Find("txtQty", False)(0)
Dim leadTimeText As Processing.ReportItemBase = section.Items.Find("txtLeadTime", False)(0)
Dim notesText As Processing.ReportItemBase = section.Items.Find("txtNotes", False)(0)
Dim row As DataRowView = TryCast(section.DataItem, DataRowView)
If row IsNot Nothing Then
Dim val As Object = row.Row("LINE_TYPE")
If Not (TypeOf val Is DBNull) AndAlso _
val.ToString.ToUpper = "GRP" Then
typeText.Visible = False
mfgText.Visible = False
catalogText.Style.Font.Bold = True
End If
End If
End Sub
Any help will be greatly appreciated!
Rich