Telerik Forums
Reporting Forum
2 answers
311 views
Hi,

I am new to Telerik reporting, and I have just tried using it via the Trial version (Q2 2010).  I have successfully created a report and preview it , but when I try to use the WPF viewer I hit the following exception.

Could not load file or assembly 'Telerik.Windows.Controls, Version=2010.1.421.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/OfficeBlack/ReportViewer.xaml'.

The problem occurs when I run the WPF Application which has the Report viewer

I have found that if I add a reference to
  • Telerik.Windows.Controls.dll, 
  • Telerik.Windows.Controls.Input.dll, 
  • Telerik.Windows.Controls.Navigation.dll,
  • Telerik.Windows.Data.dll 


Notes:
  • I've the Q2 Rad controls SP1 and also Q2 Rad controls SP1
  • I've Visual Studio 2008 SP1 & .Net Framework 3.5 SP1

Any Help !!

Thanks in advance
Mahail
Top achievements
Rank 1
 answered on 24 May 2012
1 answer
110 views
Hi,
I want to give dynamic values for y axis in chart using vb code and i need the code programmetically.
Steve
Telerik team
 answered on 24 May 2012
1 answer
273 views
I have a report Viewer in a web user control. The control displays Ext.NET window which has Report viewer control. Following is the declaration of Report Viewer:

   <telerik:ReportViewer ID="Viewer" runat="server"
        ViewMode="PrintPreview" Width="100%" Height="500"
ZoomMode="PageWidth" >
<Resources ProcessingReportMessage="Please wait" />
    </telerik:ReportViewer>

 the code behind has the following: 

   public partial class ucReport : Finance.Controls.BaseUserControl
    {
        public void Print(int id)
        {
            try
            {
                Reports.VoucherReport report = new Finance.Reports.VoucherReport();
                report.ReportParameters["voucherid"].Value = id;
                Viewer.Report = report;
                Viewer.RefreshReport();
                winPrint.Show();
            }
            catch (Exception ex)
            {
                Boxes.Error(ex);
            }
        }
}
 During the execution the report viewer appears blank. no exceptions are raised nothing. I dont know if I'm doing anything incorrect. please help me
Steve
Telerik team
 answered on 24 May 2012
1 answer
134 views
Hi

I am using Silverlight 5 with telerik reporting v6.0.12.330

Is it now possible to print the report in landscape legal without interacting with the print dialog? Note: without using the adobe plugin.

Thanks
Steve
Telerik team
 answered on 24 May 2012
2 answers
84 views
Hi,

While I welcome the availability of linear barcode supports in Reporting Tools, but I also wish to see 2D barcodes support too.

Preferrably extended to ASP.NET Web and WinForms supports too.

Thank you.

Regards,
Jenson
Jenson
Top achievements
Rank 2
 answered on 24 May 2012
0 answers
174 views
Hi I'm just wondering if I can migrate my iTextSharp Report to Telerik Report. Its purely code behind and all it needs are just imports and it will make my datasource be downloaded or viewed as pdf.

Heres my sample code in iTextSharp:

Imports iTextSharp.text
Imports iTextSharp.text.pdf
Imports iTextSharp.text.html
Imports iTextSharp.text.html.simpleparser


 Private Sub ExportToPDF(ByVal dtS As DataTable)
        dtR As New DataTable, dr As DataRow, dg As New DataGrid

        dg.GridLines = GridLines.Both
        dg.ForeColor = Color.Black
        dg.AutoGenerateColumns = False

        dtR.Columns.Add("INVOICE_NO", Type.GetType("System.String"))
        dtR.Columns.Add("INVOICE_DATE", Type.GetType("System.String"))
        dtR.Columns.Add("CLIENT", Type.GetType("System.String"))
        dtR.Columns.Add("INVOICE_AMT", Type.GetType("System.Decimal"))
        dtR.Columns.Add("TOTAL_DUE", Type.GetType("System.Decimal"))
        dtR.Columns.Add("PAID_AMT", Type.GetType("System.Decimal"))
        dtR.Columns.Add("PAID_DATE", Type.GetType("System.String"))

        CreatePDFColumn(dg, "INVOICE_NO", "Invoice<br>No.", "{0:########0;(########0); }")
        CreatePDFColumn(dg, "INVOICE_DATE", "Invoice<br>Date", "")
        CreatePDFColumn(dg, "CLIENT", "Client Name", "")
        CreatePDFColumn(dg, "INVOICE_AMT", "Invoice<br>Amount", "{0:###,###,##0;(###,###,##0); }")
        CreatePDFColumn(dg, "TOTAL_DUE", "Total<br>Due", "{0:###,###,##0;(###,###,##0); }")
        CreatePDFColumn(dg, "PAID_AMT", "Paid<br>Amount", "{0:###,###,##0;(###,###,##0); }")
        CreatePDFColumn(dg, "PAID_DATE", "Paid<br>Date", "")

 

        Dim drR As DataRow
        For Each dr In dtS.Rows
            drR = dtR.NewRow
            drR("INVOICE_NO") = dr("INVOICE_NO")
            drR("INVOICE_DATE") = dr("INVOICE_DATE")
            drR("CLIENT") = dr("CLIENT")
            drR("INVOICE_AMT") = dr("INVOICE_AMT")
            drR("TOTAL_DUE") = dr("TOTAL_DUE")
            drR("PAID_AMT") = dr("PAID_AMT")
            drR("PAID_DATE") = dr("PAID_DATE")
            dtR.Rows.Add(drR)
        Next
        drR = dtR.NewRow
        drR("INVOICE_NO") = ""
        drR("INVOICE_DATE") = ""
        drR("CLIENT") = "Total:""
        drR("INVOICE_AMT") = Me.lblInvoiceAmt.Text
        drR("TOTAL_DUE") = Me.lblTotalDue.Text
        drR("PAID_AMT") = Me.lblPaidAmt.Text
        drR("PAID_DATE") = ""
        dtR.Rows.Add(drR)

        Response.Clear()
        Dim dv As New DataView(dtR)
  
        Dim sw As System.IO.StringWriter = New System.IO.StringWriter
        Dim hw As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(sw)
        hw.WriteLine("<b><u><font size='2'>" & _
             "Invoice List:" & _
             "</font></u></b>")
        hw.WriteLine("<br><br>&nbsp;")
        dg.DataSource = dv
        dg.HeaderStyle.Font.Bold = True
        dg.DataBind()
        dg.RenderControl(hw)

        Response.ContentType = "application/pdf"
        Response.AddHeader("content-disposition", "attachment;filename=InvoiceReport.pdf")

        Dim sr As New StringReader(sw.ToString())
        Dim pdfDoc As New Document(PageSize.A4.Rotate, 10.0F, 10.0F, 10.0F, 0.0F)
        Dim htmlparser As New HTMLWorker(pdfDoc)

        PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
        pdfDoc.Open()
        htmlparser.Parse(sr)
        pdfDoc.Close()
        Response.Write(pdfDoc)
        Response.End()
    End Sub

 

 

 

 

 

 

 

 

 


RJ
Top achievements
Rank 1
 asked on 24 May 2012
14 answers
2.4K+ views
Hi,

The error below is shown in the web report viewer instead of the report:
An error has occured while processing Chart 'myChart':
Cannot set Column 'myColumn' to be null. Please use DBNull instead.

I am using a Telerik.Reporting.Chart bound to a Telerik,Reporting.DataSource. It uses a stored procedure to return a set of data. One of the columns it returns is nullable and when it returns a null I get the error above. However, this column is not actually used in the Chart.

If I change the sproc so that this column is NOT returned or it returns a 0 instead of NULL the report works fine. (I don't want to do this as this sproc is used elsewhere and I want to distinguish 0 from NULL).

I am using the 2010 Q1 release of Telerik Reporting (4.0.10.423).

Thanks,
Jason
kahuna
Top achievements
Rank 1
 answered on 23 May 2012
0 answers
479 views

EDIT:  Come on Telerik ... stop trying to sell your products & support so much, and actually care about the end-user : us developers. There is no reason why I shouldn't be able to post a solution showing how to solve the buggy behavior with your product. However, since Telerik doesn't like people helping out other people, here is a direct link to the ZIP file (which I cannot upload here, since it's not a gif, jpg, jpeg or png): http://bbarstow.relyonmedia.com/TelerikReportingChartsExamples.zip

So, you've always wanted to use a data source that had NULL values in it as the source for your charts. But the Telerik.Reporting.Chart doesn't handle null-s very well et all.

Solves these problems with Telerik Line & Bar (maybe others) charts using null-s:

  • Hide data point / data point label when value is null. (I.e. don't approximate and don't show 0)
  • Fixes "Cannot set Column 'myCol' to null. Please use DBNull instead" error

See sample Visual Studio 2010 solution which shows a line and a bar chart using a data table that has a couple of null-s.

-Blaise

(this is also more or less a response / extension to the no-longer-working hacks posted at http://www.telerik.com/community/forums/reporting/telerik-reporting/cannot-set-column-mycol-to-null-please-use-dbnull-instead.aspx)

(Quote from support ticket:

"I got it to work by creating all charts in code-behind. This shows that the 'designer mode' is next to useless, because the same functionality cannot be achieved by using the designer. I also had to use different steps to get the functionality to work correctly with both bar and line charts.

For both chart types the following steps worked:

1. In Chart_NeedDataSource event, loop through each row (create ChartSeries) and column in DataTable. When adding each ChartSeriesItem, if the value to add = DBNull.Value then use ‘ChartSeries.AddItem(new ChartSeriesItem(true))’ (Otherwise, add chart series item normally, i.e. ‘ChartSeries.AddItem(new ChartSeriesItem(5.0, “5”))’

2. After adding all ChartSeries (data) to the chart, then loop through each ChartSeriesItem in all Chart.Series (nested ‘foreach’.) When looping, we check if ‘ChartSeriesItem.Empty’ and when true, we now know that we have a null value and to handle that appropriately. For bar charts we set ‘ChartSeriesItem.Visible = false;’ and for line charts we set ‘ChartSeriesItem.Label.Visible = false;’

The buggy behavior:

· After the back and forth, and much trial and error, I discovered that in the line charts, the buggy behavior was caused by using the setting “ChartSeries.Appearance.PointMark.Visible” Setting this to true causes all ChartSeriesItem.Label-s to show up, all the time. The point mark visibility should not have any effect on the ChartSeriesItem.Label visibility.

The suggested / desired behavior for null-s:

1. When using any data source, NULL values should always be added to the ChartSeries as an empty ChartSeriesItem. (In accordance with the suggested new EmptyValuesMode)

2. ChartSeries.Appearance.EmptyValue.Mode should have the option of being set to ‘EmptyValuesMode.Hide’. This new option would hide the point marks / connecting lines / label connectors & labels for all empty ChartSeriesItems. (I.e. for Bar Charts setting ‘ChartSeriesItem.Visible = false’, and for Line Charts ‘ChartSeriesItem.Label.Visible = false’)

3. Additionally, ‘Telerik.Reporting.Charting.Styles.EmtyValuesMode’ is spelt wrong, and should be ‘EmptyValuesMode’ (missing the “p” in Empty)

4. A demo project using a standard data source and null-s should be added to the documentation. A real life example showing how to implement null-s would be great.")

kahuna
Top achievements
Rank 1
 asked on 23 May 2012
4 answers
516 views
I have a group which needs the group footer to only show on the first page of a new grouping, but if the group goes to more than one page, the subequent pages should NOT show this footer. And then when the next grouping appears, it should again show this footer just on the first page for that group.

How would one go about doing this?
Steve
Telerik team
 answered on 23 May 2012
5 answers
245 views
We are converting our software from vs2008 to vs2010. we have been using the Report Q1 2009 as our reporting tool. when we try to add the Q1 2009 controls to the vs2010 toolbox they are greyed out. What the deal here. do we need to update to the current version to have the tools show up correctly in the toolbar?

Thanks
John 
Steve
Telerik team
 answered on 23 May 2012
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?