or
I have recently upgraded to 2012 Q2, from 2008 Q3, and now none of textboxes or pictureboxes that utilize the =FIELDS collection have anything in them, and all this worked fine with the earlier version. Below is the definition of the page, and the method that utilizes/manipulates the data. The only thing that appears on the page is the current date.
Anyone have ANY idea why the data is not binding?
Thanks,
Rich
Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Imports Telerik.Reporting Imports Telerik.Reporting.Drawing Public Class CoverPage Inherits Telerik.Reporting.Report Friend WithEvents PageHeaderSection1 As Telerik.Reporting.PageHeaderSection Friend WithEvents DetailSection1 As Telerik.Reporting.DetailSection Private WithEvents pictureBox1 As Telerik.Reporting.PictureBox Private WithEvents textBox1 As Telerik.Reporting.TextBox Private WithEvents textBox8 As Telerik.Reporting.TextBox Private WithEvents textBox9 As Telerik.Reporting.TextBox Private WithEvents textBox10 As Telerik.Reporting.TextBox Private WithEvents textBox2 As Telerik.Reporting.TextBox Friend WithEvents PageFooterSection1 As Telerik.Reporting.PageFooterSection Public Sub New() InitializeComponent() End Sub 'NOTE: The following procedure is required by the telerik Reporting Designer 'It can be modified using the telerik Reporting Designer. 'Do not modify it using the code editor. Private Sub InitializeComponent() Me.PageHeaderSection1 = New Telerik.Reporting.PageHeaderSection() Me.pictureBox1 = New Telerik.Reporting.PictureBox() Me.textBox1 = New Telerik.Reporting.TextBox() Me.textBox8 = New Telerik.Reporting.TextBox() Me.textBox9 = New Telerik.Reporting.TextBox() Me.textBox10 = New Telerik.Reporting.TextBox() Me.textBox2 = New Telerik.Reporting.TextBox() Me.DetailSection1 = New Telerik.Reporting.DetailSection() Me.PageFooterSection1 = New Telerik.Reporting.PageFooterSection() CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() ' 'PageHeaderSection1 ' Me.PageHeaderSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(8.7895841598510742R) Me.PageHeaderSection1.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.pictureBox1, Me.textBox1, Me.textBox8, Me.textBox9, Me.textBox10, Me.textBox2}) Me.PageHeaderSection1.Name = "PageHeaderSection1" ' 'pictureBox1 ' Me.pictureBox1.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.010456085205078125R), Telerik.Reporting.Drawing.Unit.Inch(0.010456006042659283R)) Me.pictureBox1.MimeType = "" Me.pictureBox1.Name = "pictureBox1" Me.pictureBox1.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.9791271686553955R), Telerik.Reporting.Drawing.Unit.Inch(1.9791272878646851R)) Me.pictureBox1.Sizing = Telerik.Reporting.Drawing.ImageSizeMode.ScaleProportional Me.pictureBox1.Value = "=Fields.LOGO" ' 'textBox1 ' Me.textBox1.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.0062500634230673313R), Telerik.Reporting.Drawing.Unit.Inch(2.5R)) Me.textBox1.Name = "textBox1" Me.textBox1.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4728379249572754R), Telerik.Reporting.Drawing.Unit.Inch(0.38958358764648438R)) Me.textBox1.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(20.0R) Me.textBox1.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center Me.textBox1.Value = "=Fields.JOB_NAME" ' 'textBox8 ' Me.textBox8.Format = "{0:d}" Me.textBox8.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.0R), Telerik.Reporting.Drawing.Unit.Inch(3.1314079761505127R)) Me.textBox8.Name = "textBox8" Me.textBox8.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4790878295898437R), Telerik.Reporting.Drawing.Unit.Inch(0.20000004768371582R)) Me.textBox8.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center Me.textBox8.Value = "=Now()" ' 'textBox9 ' Me.textBox9.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.0R), Telerik.Reporting.Drawing.Unit.Inch(2.9104957580566406R)) Me.textBox9.Name = "textBox9" Me.textBox9.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4790878295898437R), Telerik.Reporting.Drawing.Unit.Inch(0.20000004768371582R)) Me.textBox9.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center Me.textBox9.Value = "=Fields.PROJECT_NUMBER" ' 'textBox10 ' Me.textBox10.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(3.5104167461395264R), Telerik.Reporting.Drawing.Unit.Inch(0.010456045158207417R)) Me.textBox10.Name = "textBox10" Me.textBox10.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.9686708450317383R), Telerik.Reporting.Drawing.Unit.Inch(0.20000004768371582R)) Me.textBox10.Value = "=Fields.ENTIRE_ADDR" ' 'textBox2 ' Me.textBox2.Location = New Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.031368255615234375R), Telerik.Reporting.Drawing.Unit.Inch(6.0208334922790527R)) Me.textBox2.Name = "textBox2" Me.textBox2.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.4686317443847656R), Telerik.Reporting.Drawing.Unit.Inch(2.7687110900878906R)) Me.textBox2.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom Me.textBox2.Value = "=Fields.COVER_PAGE_TEXT" ' 'DetailSection1 ' Me.DetailSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.0520833320915699R) Me.DetailSection1.Name = "DetailSection1" ' 'PageFooterSection1 ' Me.PageFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.0520833320915699R) Me.PageFooterSection1.Name = "PageFooterSection1" ' 'CoverPage ' Me.Items.AddRange(New Telerik.Reporting.ReportItemBase() {Me.PageHeaderSection1, Me.DetailSection1, Me.PageFooterSection1}) Me.Name = "CoverPage" Me.PageSettings.Landscape = False Me.PageSettings.Margins.Bottom = Telerik.Reporting.Drawing.Unit.Inch(1.0R) Me.PageSettings.Margins.Left = Telerik.Reporting.Drawing.Unit.Inch(1.0R) Me.PageSettings.Margins.Right = Telerik.Reporting.Drawing.Unit.Inch(1.0R) Me.PageSettings.Margins.Top = Telerik.Reporting.Drawing.Unit.Inch(1.0R) Me.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter Me.Style.BackgroundColor = System.Drawing.Color.White Me.Width = Telerik.Reporting.Drawing.Unit.Inch(6.5R) CType(Me, System.ComponentModel.ISupportInitialize).EndInit() End SubEnd Class Private Sub CreateCoverPage(ByVal submittalID As Decimal, ByVal doc As PDFDocument) Dim dtCover As doSubmittal.CoverPageDataTable Using rpt As New boSubmittal dtCover = rpt.CoverPage_GetBySubmittalID(submittalID) End Using Dim dr As doSubmittal.CoverPageRow = dtCover(0) dr.ENTIRE_ADDR = String.Empty If Not dr.IsREP_NAMENull Then dr.ENTIRE_ADDR &= dr.REP_NAME & vbCrLf If Not dr.IsADDR_LINE_1Null AndAlso Not String.IsNullOrEmpty(dr.ADDR_LINE_1.Trim) Then dr.ENTIRE_ADDR &= dr.ADDR_LINE_1 & vbCrLf If Not dr.IsADDR_LINE_2Null AndAlso Not String.IsNullOrEmpty(dr.ADDR_LINE_2.Trim) Then dr.ENTIRE_ADDR &= dr.ADDR_LINE_2 & vbCrLf If Not dr.IsADDR_LINE_3Null AndAlso Not String.IsNullOrEmpty(dr.ADDR_LINE_3.Trim) Then dr.ENTIRE_ADDR &= dr.ADDR_LINE_3 & vbCrLf If Not dr.IsCITYSTATEZIPNull Then dr.ENTIRE_ADDR &= dr.CITYSTATEZIP & vbCrLf If Not dr.IsPHONE_NUMBERNull Then dr.ENTIRE_ADDR &= "Phone: " & dr.PHONE_NUMBER & vbCrLf If Not dr.IsFAX_NUMBERNull Then dr.ENTIRE_ADDR &= "Fax: " & dr.FAX_NUMBER & vbCrLf If Not dr.IsREP_CONTACT_NAMENull Then dr.ENTIRE_ADDR &= "Contact: " & dr.REP_CONTACT_NAME & vbCrLf If Not dr.IsPRINT_CONTACTS_FLAGNull Then dr.ALL_CONTACTS = String.Empty Dim contacts = GetContacts(submittalID) dr.ALL_CONTACTS &= vbCrLf & "Submitted To: " & vbCrLf & contacts End If If Not dr.IsVERSION_NUMBERNull Then dr.PROJECT_NUMBER = dr.PROJECT_NUMBER & "-" & dr.VERSION_NUMBER End If Dim cvr As New CoverPage Dim mimType As String = String.Empty Dim extension As String = String.Empty Dim encoding As Encoding = Nothing Dim rptProcessor As New Telerik.Reporting.Processing.ReportProcessor() Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource() instanceReportSource.ReportDocument = cvr Dim result As Telerik.Reporting.Processing.RenderingResult = rptProcessor.RenderReport("PDF", instanceReportSource, Nothing) Dim fileName As String = result.DocumentName & ".pdf" Dim buffer As Byte() = result.DocumentBytes PDFFileEx.SerialNumber = _serialNumber Dim mctiFile As PDFFileEx = PDFFileEx.FromStream(New MemoryStream(buffer)) Try ' extract the content Dim ic As PDFImportedContent() = mctiFile.ExtractPagesContent() ' create the new document Dim pic As PDFImportedContent For Each pic In ic ' draw the imported content on the new page Dim page1 As PDFPage = doc.AddPage() page1.Canvas.DrawImportedContent(pic, 0, 0, page1.Width, page1.Height) Next Finally mctiFile.Close() mctiFile.Dispose() cvr.Dispose() dtCover.Dispose() End Try End Sub/// <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 |