Telerik Forums
Reporting Forum
5 answers
131 views
We're trying to create a new report inside an ASP.NET page using OpenAccess as a datasource and, althought the page works without problems, when we click on 'Preview' tab on Visual Studio, it alwways throws the next exception.

Telerik reporting Ver: 2013 Q1 (Trial)
OpenAccess Ver: 2013 Q1
Database: SQL Compact Edition 4

An error has occurred while processing Report 'InfFactura': An error occurred while invoking data retrieval method. Try restarting Visual Studio. ------------- InnerException ------------- Se produjo una excepción en el destino de la invocación. ------------- InnerException ------------- The metadata for field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente' cannot be initialized: Field '_cliente' of class 'Facturacion.BdFacturacion.Clientefactura' is not a reference, collection or array; was used to define field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente'. --> Bemasoft/namespace[Facturacion.BdFacturacion]/class[Cliente]/field[_clientefacturas]/collection/inverse="_cliente" ------------- InnerException ------------- Field '_cliente' of class 'Facturacion.BdFacturacion.Clientefactura' is not a reference, collection or array; was used to define field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente'. --> Bemasoft/namespace[Facturacion.BdFacturacion]/class[Cliente]/field[_clientefacturas]/collection/inverse="_cliente"

Any idea?
Stef
Telerik team
 answered on 16 Apr 2014
1 answer
121 views
Dear Concerned,
I'm using a Crosstab inside my report. The crosstab works great when there is samll number of columns (specially < 12)
My Column Group is only one DB field which represents a date field. The report has 2 parameters DateFrom and DateTo to specify the period of the report.
If I choos a period more than 12 months, the problem shows. A complete render issue with the columns are mixed and the report title will be hidden by many many columns and also the viewer will hang and the Export option will hang and if you tried to click on the export option a complete disaster happens when the whole solution stops working!!!!!
 I attached 2 screenshots one for the report with less column numbers and one if 12 months are selected
Stef
Telerik team
 answered on 16 Apr 2014
1 answer
76 views
Team,

Previously we are using Q3 2011 SP1 Telerik.Reporting.dll(of versions 5.3.12.119) and now we are planning to upgrade it to latest version i.e. Q1 2014 libraries as part of that we downloaded a trial version and started testing. After replacing the latest dll's, I am not finding the below class:

"Telerik.Reporting.Processing.ExtensionInfo"

Please let us know whether it is completely removed or it is moved to a different namespace with different namespace? If so what is the work around for this?

Note: As of now ExtensionInfo class is getting a namespace in "Telerik.Reporting.Services.Engine" which has different properties what we are using in the above class.

regards,
sharan
Stef
Telerik team
 answered on 16 Apr 2014
1 answer
113 views
Hi,

We are using ASP.NET and report viewer in our application, is it possible to bind the report source from client script, we will have a web method which returns the report source as an xml with the parameter values. On the client side we need to bind the report source to the report viewer.

Regards,
Majid
Stef
Telerik team
 answered on 16 Apr 2014
1 answer
118 views
Hi there -

I am thoroughly frustrated with the reporting tool.  I have been working on a voucher statement project for some time and experiencing that the reporting tools do not simple things you would think it would do.  I have made design changes to reports to work around printing issues, however I find myself having other issues.  Therefore, I am currently experiencing several issues and I will try to explain them as best I can.

To describe what the project entails, this is a simple reporting solution for printing credit vouchers.
I get a list of payment numbers to read and process a statement page, and credit voucher for each payment.

I am using a report book to add the reports as they are processed, so I can print them as a whole.
The sequencing of the entire report book should be as follows:

1 -  Header Report (Displays general text)

2 -  Credit Voucher Statement (A list of details that make up the voucher)
3 -  Actual Credit Voucher (Single Page coupon)

NOTE: If there are multiple payment numbers, I print reports 2 and 3 in a loop, adding them to the report book as they are processed.

4 - Summary report (Shows all the credit vouchers that were printed and other summary information)

The reports print on a duplex printer, although I try to modify that setting depending on which report is printing. 
Each report should start on a fresh sheet of paper (Which it does not currently do well.)

In the code (below), I loop through the payment numbers and pass the correct parameters to the reports.
However, when adding reports 2 and 3 to the report book, the first payment number gets repeated for the total number of payments listed.
When the summary report is printed, it too only prints the summary for the first record. 

Even when I view the data and parameters being passed to the report, they are all correct.
I'm at my wits end with this project / product and looking for solutions immediately.  There are other issues I have with the product that may come up through this dialog that may need to be worked out.

Below is the code that generates the reports and report book.  Please help provide me a solution to printing these reports.

Regards,
Bob

' Generate the reports
Me.Cursor = Cursors.WaitCursor
 
' Initialize print settings
Dim printerSettings As New System.Drawing.Printing.PrinterSettings
Dim printerController As New System.Drawing.Printing.StandardPrintController
Dim reportSource As New InstanceReportSource
 
Dim reportProcessor As New ReportProcessor
reportProcessor.PrintController = printerController
 
' Create the report book to add reports
Dim reportBook As New ReportBook
reportBook.DocumentName = "Credit Vouchers"
 
' Print the report header
printerSettings.Duplex = Printing.Duplex.Simplex
 
Dim rptHeader As New CreditVoucherReportLibrary.ReportTitle
reportBook.Reports.Add(rptHeader)
 
Dim c As Integer = 0
Dim firstCV As String = ""
Dim lastCV As String = ""
 
Dim cn As New SqlConnection(My.Settings.OMSConnectionString)
Using cn
    cn.Open()
 
    ' Get the list of voucher numbers to print
    Dim cmd As SqlCommand = New SqlCommand("Accounts_Payable.get_Credit_Vouchers_Lot_list", cn)
    cmd.CommandType = CommandType.StoredProcedure
 
    IIf(CreditVoucherTextBox.Text = "", Nothing, CreditVoucherTextBox.Text)
 
    cmd.Parameters.AddWithValue("@Year", YearComboBox.SelectedItem)
    cmd.Parameters.AddWithValue("@Month", PeriodComboBox.SelectedItem)
    cmd.Parameters.AddWithValue("@Payment_Number_Code", IIf(CreditVoucherTextBox.Text = "", Nothing, CreditVoucherTextBox.Text))
 
    Try
        Dim r As SqlDataReader = cmd.ExecuteReader
        If r.HasRows Then
 
            While r.Read
 
                Dim rptVoucherStatement As New CreditVoucherReportLibrary.CV_Statement
                Dim rptVoucher As New CreditVoucherReportLibrary.CreditVoucher
 
                ' Print Credit Voucher Statement
                rptVoucherStatement.ReportParameters("YearPeriod").Value = YearComboBox.SelectedItem
                rptVoucherStatement.ReportParameters("MonthPeriod").Value = PeriodComboBox.SelectedItem
                rptVoucherStatement.ReportParameters("PaymentNumber").Value = Trim(r(0))
 
                printerSettings.Duplex = Printing.Duplex.Horizontal
 
                ' Add the voucher statement to the report book
                Try
                    reportBook.Reports.Add(rptVoucherStatement)
                Catch ex As Exception
 
                End Try
 
                ' Print Credit Voucher
                c += 1
 
                rptVoucher.ReportParameters("YearPeriod").Value = YearComboBox.SelectedItem
                rptVoucher.ReportParameters("MonthPeriod").Value = PeriodComboBox.SelectedItem
                rptVoucher.ReportParameters("PaymentNumber").Value = Trim(r(0))
                rptVoucher.ReportParameters("LastUpdatedBy").Value = "System"
                rptVoucher.ReportParameters("IsReprint").Value = False
 
                If c = 1 Then
                    firstCV = Trim(r(0))
                Else
                    lastCV = Trim(r(0))
                End If
 
                printerSettings.Duplex = Printing.Duplex.Simplex
 
                ' Add the voucher to the report book
                Try
                    reportBook.Reports.Add(rptVoucher)
                Catch ex As Exception
 
                End Try
            End While
        End If
    Catch ex As Exception
 
    End Try
End Using
 
' Print the summary page
Dim rptSummary As New CreditVoucherReportLibrary.CV_Summary_Report
 
Try
    Dim range As String = ""
    If c = 1 Then
        range = firstCV
    Else
        range = firstCV & " - " & lastCV
    End If
 
    rptSummary.ReportParameters("YearPeriod").Value = YearComboBox.SelectedItem
    rptSummary.ReportParameters("MonthPeriod").Value = PeriodComboBox.SelectedItem
    rptSummary.ReportParameters("PaymentNumber").Value = IIf(CreditVoucherTextBox.Text = "", Nothing, CreditVoucherTextBox.Text)
 
    rptSummary.ReportParameters("RangeOfVouchers").Value = range
    rptSummary.ReportParameters("NumberOfVouchers").Value = c
 
    printerSettings.Duplex = Printing.Duplex.Horizontal
 
    ' Add the summary to the report book
    reportBook.Reports.Add(rptSummary)
Catch ex As Exception
 
End Try
 
' Print the report book
If PrintPreviewCheckBox.Checked Then
    Dim dlg As New CreditVoucherPrintPreviewForm
 
    dlg.reportBook = reportBook
 
    dlg.ShowDialog()
Else
    reportSource.ReportDocument = reportBook
    reportProcessor.PrintReport(reportSource, printerSettings)
End If

Nasko
Telerik team
 answered on 16 Apr 2014
6 answers
257 views
Hi

We are SilverLight ReportViewer and displaying pie charts in the reports. The pie chart is not being displayed sometimes when seen in the reportviewer but when saved to pdf we are able to see all the pie charts in the reports. Please find the attached screenshots for furthur reference and let us know if anything has to be done from our end.

And the behaviour is inconsistent in reportviewer, so its not reproducible always.

Thanks in advance
Ravindra 
Nasko
Telerik team
 answered on 16 Apr 2014
7 answers
377 views
I have a EF 6 datasource configured and working but I'm finding it very limited.  There seems to be no way to query the datasource using Linq from the designer.  I was expecting it to work like the SQL datasource where a query can be specified and then embedded in the report.
Nasko
Telerik team
 answered on 16 Apr 2014
2 answers
85 views
Hello, 

I'm working on an applicationt that is using wcf services to access a remote database, and csv stored to the isolated storage for managing offline mode. 
The need I have it's to give users the possiblity to continue generating reports using local data. Is it possible to do it using Telerik SL components? 

Thanks a lot for your help. 
Regards
Stef
Telerik team
 answered on 16 Apr 2014
5 answers
251 views
Hi,

I have created a C# windows forms application to export reports programatically. Reports are created using standalone report designer and added in a folder within the application. Reports have a multivalue parameter site whose value is set to AllValues(Fields.Id). AllValues function by default selects all site values. While running the application, report is exported programmatically. But, when I check the report that is created, it has the following message
An error has occurred while processing Report 'GameMetric':
The expression contains undefined function call AllValues().
Following is the piece of code which exports report programmatically.
try
                    {
                        Telerik.Reporting.UriReportSource URI = new Telerik.Reporting.UriReportSource();
                        string reportKey = dt.Rows[i]["report_key"].ToString();
                        string reportName = dt.Rows[i]["report_name"].ToString();
                        appendMessage("Run Report: " + reportName, ref message);

                        if (dt.Rows[i]["CustomFlag"].ToString() != "Y")
                            URI.Uri = Directory.GetCurrentDirectory() + "\\Reports\\" + reportKey + ".trdx";
                        else
                            URI.Uri = Directory.GetCurrentDirectory() + "\\Reports\\" + "Dynamic Report.trdx";

                        XmlReaderSettings settings = new XmlReaderSettings();
                        settings.IgnoreWhitespace = true;
                        using (XmlReader xmlReader = XmlReader.Create(URI.Uri, settings))
                        {
                            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                            ReportViewer reportViewer = new ReportViewer();
                            Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer =
                                                  new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();

                            Telerik.Reporting.Report report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
                            string newConn = Common.changeConnectionString(Properties.Settings.Default.ParafaitConnectionString, "ParafaitMultisite");
                            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
                            //SetConnectionString(newConn, report);
                            reportViewer.Report = report;
                            reportViewer.ReportSource.Parameters.Add("fromdate", fromDate.ToString());
                            reportViewer.ReportSource.Parameters.Add("todate", toDate.ToString());
                            //reportViewer.ReportSource.Parameters.Add("offSet", Convert.ToString(ParafaitTimezone.FinalOffset()));
                            reportViewer.ReportSource.Parameters.Add("user", "Parafait Scheduler");
                            reportViewer.ReportSource.Parameters.Add("loggedInUserName", "Parafait Scheduler");
                            reportViewer.ReportSource.Parameters.Add("role", " ");
                            reportViewer.ReportSource.Parameters.Add("loggedInUserId", Common.getLoggedinUser());
                            string reportID = dt.Rows[i]["report_id"].ToString();
                            reportViewer.ReportSource.Parameters.Add("reportID", reportID);
                            reportViewer.ReportSource.Parameters.Add("isCorporate", "Y");
                            //reportViewer.RefreshReport();
                            string fileName = "D:\\Parafait Home\\Reports\\" + reportName + TimeStamp + ".pdf";
                            try
                            {
                                Telerik.Reporting.Processing.RenderingResult renderingResult = reportProcessor.RenderReport("PDF", reportViewer.ReportSource, deviceInfo);
                                using (FileStream fs = new FileStream(fileName, FileMode.Create))
                                {
                                    fs.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
                                }
                            }
                            catch (Exception ex)
                            {
                                appendMessage(ex.Message, ref message);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        appendMessage(ex.Message, ref message);
                    }
                }
                
                appendMessage("Done creating reports", ref message);

I have added the assembly reference in report designer config file.

When I run the same set of reports in a web form it seems to be working without any issues.
What wrong could I have done?
Hinata
Top achievements
Rank 1
 answered on 16 Apr 2014
5 answers
139 views
Guys,
This is a breaking change and I haven't yet figured out why it is happening to my project when I am upgrading to Q1 2014.
The xaml code is -
             xmlns:tr="http://schemas.telerik.com/wpf"

        <tr:ReportViewer x:Name="reportViewer" HorizontalAlignment="Stretch" Margin="10"
                         ReportSource="{Binding ReportSource}">
            <telerikControls:StyleManager.Theme>
                <telerikControls:Windows7Theme />
            </telerikControls:StyleManager.Theme>
        </tr:ReportViewer>

Application breaks in execution with message -
'The invocation of the constructor on type 'Telerik.ReportViewer.Wpf.ReportViewer' that matches the specified binding constraints threw an exception.' Line number '34' and line position '10'

I am referencing to following dlls in the project :
1. Telerik.reporting - v4.0.30319
2. Telerik.ReportViewer.Wpf - v4.0.30319
3. Telerik.Windows.Controls - v4.0.30319
Stef
Telerik team
 answered on 16 Apr 2014
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?