Telerik Forums
Reporting Forum
3 answers
1.1K+ views

     I am attempting to use the standalone report designer to populate a report from a Web Service Data Source.  The source will return an image as a byte array (byte[] someImage {get;set;}.  I can see the bytes coming from the web service just fine but when I set the bindings to bind the value to the byte array from the web service the report throws an exception that indicates: "Could not find a part of the path...(encoded byte array here".  I am sending in bytes but the picture box is interpreting the value property as only the path and not the bytes.  Is this possible?  Am I doing this incorrectly?  Do I need to use the Visual Studio designer instead?  Any help or guidance would be appreciated...thanks in advance.

Nasko
Telerik team
 answered on 11 Jul 2018
0 answers
193 views

I've got a report with a table and the columns are grouped.

The setup would be something like this

Category 1 - Test         Category 1 details 1

                                     Category 1 details 2

                                     Category 1 details 3

Category 2 - Test          Category 2 details 1

                                      Category 2 details 2

                                      Category 2 details 3

                                      Category 2 details 4

 

I've got my own numbering value that's being passed into the report which produces those details 1, 2 ,3, etc.... And then I go into my group column properties and set sorting to that field = Fields.OrderNum ASC. It seems to only sort the first row and then every other subsequent rows are not sorted so the numbers are all out of place. How would I go about fixing this issue?

 

Thanks

sudo
Top achievements
Rank 1
 asked on 10 Jul 2018
4 answers
2.0K+ views

I have a table that takes in an object data source which returns me back a list of objects that I populate the table row/columns with. 

In one of my row fields I have an expression like this Fields.Description which are grouped together so my table would look a little something like this:

 

---------------------------------------------------------

Col 1        Description

                Description1

                Description2

                Description3

Col 2        Description1

                Description2

                Description3

 

and so forth. I need to close the border at the bottom of the last Descriptions. Need some help getting started on how to apply the conditional formatting so that it will find out which is the data item on each row and then apply a border bottom on that to close the row off.

 

Thanks.

 

sudo
Top achievements
Rank 1
 answered on 10 Jul 2018
1 answer
1.2K+ views

Hello,

I use on asp.net UriReportSource to produce PDF invoice.

The datasource is now set on trdx file, I would like change the method.

I need to pass datasource from code c#, not set on file trdx.

Could you help me ?

Thank you.

public string GetInvoice()
        {
            string fileName = Path.GetTempPath() + (Guid.NewGuid()).ToString() + ".pdf";
            UriReportSource uriReportSource = GetInvoiceUriReportSource();
            ExportToPDF(GetReport(uriReportSource), fileName);
 
            return fileName;
        }
 
        private void ExportToPDF(UriReportSource reportToExport, string fileName)
        {
            ReportProcessor reportProcessor = new ReportProcessor();
            RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null);
            using (FileStream fs = new FileStream(fileName, FileMode.Append))
            {
                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            }
        }
 
 
        private UriReportSource GetInvoiceUriReportSource()
        {
            UriReportSource uriReportSource = new Telerik.Reporting.UriReportSource();
            if (HostingEnvironment.ApplicationPhysicalPath != null)
                uriReportSource.Uri = HostingEnvironment.ApplicationPhysicalPath + SettingType.TemplateFacture.GetValue();
            else
                uriReportSource.Uri = Directory.GetCurrentDirectory() + SettingType.TemplateFacture.GetValue();
 
             
            return GetReport(uriReportSource);
        }
 
        private UriReportSource GetReport(UriReportSource report, int documentRowId = -1)
        {
                        
 
            report.Parameters.Add(new Telerik.Reporting.Parameter("DocumentID", DocumentId));
            report.Parameters.Add(new Telerik.Reporting.Parameter("DocumentLigneID", documentRowId));
            report.Parameters.Add(new Telerik.Reporting.Parameter("SocieteNom", SettingType.SocieteNom.GetValue()));
            report.Parameters.Add(new Telerik.Reporting.Parameter("SocieteAdresse", SettingType.SocieteAdresse.GetValue()));
            report.Parameters.Add(new Telerik.Reporting.Parameter("SocieteCPVille", SettingType.SocieteCPVille.GetValue()));
            report.Parameters.Add(new Telerik.Reporting.Parameter("SocieteSiret", SettingType.SocieteSiret.GetValue()));
            report.Parameters.Add(new Telerik.Reporting.Parameter("SocieteTEL", SettingType.SocieteTEL.GetValue()));
 
            
 
            return report;
        }

 

 

Nasko
Telerik team
 answered on 10 Jul 2018
1 answer
250 views

      Hi, 

 

I am trying to show multiple reports in a reportbook object in WPF

However , I do not get any ReportSources Collection on my reportbook object , only the reports collection.    When I try to use report instead of TypeReportSource it tells me Report is obsolete and I must use ReportSource .  I have a standard WPF window, with a reportviewer object but now I want to use a reportbook object to show multiple reports.

 

var reportViewerWnd = new ReportBookViewerWnd();
            var report = new Telerik.Reporting.Report();

            var reportBook = new Telerik.Reporting.ReportBook();

            var typeReportSource = new Telerik.Reporting.TypeReportSource();
            typeReportSource.TypeName = "Schedwin.Reports.Tickets.PassengerTickets, Schedwin.Reports.Telerik";
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("ReservationIDX", ReservationIDX));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("ReservationName", ReservationName));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("PaxName", PaxName));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("TicketNo", TicketNo));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuedBy", IssuedBy));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuedDate", IssueDate));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("IssuePlace", IssuePlace));
            typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("RegionalDBName", DatabaseName));
       
   

            reportBook.Reports.Add(typeReportSource);

            reportViewerWnd.ReportViewer.ReportSource = reportBook;
            reportViewerWnd.Title = "Passenger Ticket";

Nasko
Telerik team
 answered on 10 Jul 2018
2 answers
821 views

Hi..

How do you set a subreports ReportSource to a List<>?

 public List<uspGet_POs_DETResult> po_det { set; get; }

 

 

this.subReportDetail.ReportSource = po_det;

 

 

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorCS0029Cannot implicitly convert type 'System.Collections.Generic.List<uspGet_POs_DETResult>' to 'Telerik.Reporting.ReportSource'


Jonathan
Top achievements
Rank 1
Iron
Veteran
 answered on 10 Jul 2018
1 answer
237 views

I have installed visual studio 2015 as well as the telerik reporting which is correctly detecting that I have VS2015.  In VS2015 there is no telerik menu and there is no item template for creating a new report . 

 

Please help

Silviya
Telerik team
 answered on 10 Jul 2018
5 answers
987 views
Hello,

Can we do rotated text labels in Telerik Reporting? i.e. 90 degrees/sideways...

I have 15 columns with 1 character in them, what is the best way to implement this? Rotated headings would be perfect. I have to fit this in for printing.

Best regards.
Silviya
Telerik team
 answered on 10 Jul 2018
1 answer
391 views

No matter what I do I am unable to create a SQLDataSource.

I am using the latest Telerik Reporting Framework.

It creates a connection string and the string it creates is correct and it adds it to the App.Config.

It says connection succeeded when I test the connection.

However it says:

Unable to create SQLDataSource check your connection string.

Now, I realize that most development companies have a default message to show customers when the real error was too hard to actually program because most developers fear custom exceptions.

But in this case, the wizard just errors out and creates the Setting correctly and then doesn't create the sql data source.

Now here's how to reproduce it because I know if I don't tell you how to reproduce it you will take many days to get back to me.

1) Install Telerik Reporting Trial by itself no other features via the MSI.

2) Next Create a Standard .NET Class Library in .NET 4.7.2

3) Create The project name as NameOfTheApp.Reports

4) Create a folder called Reports

5) Create an empty app.config in the class library at the root of the class library project

6) Right click the Reports folder and Add New Item

7) Select Telerik Report Wizard
8) Select Table Template

9) From the Project or Current Data Sources Create A New SQLDataSource With Type Microsoft SQL Server Connection Type And Use 

Windows Or Sql Username/Password Authentication, Select A Database With Stored Procedures. 

10) Select Stored Procedure With A Mix Of DateTime and Other Parameters

11) Pass in 2018-07-05 or a date into the date field which would work in an actual query

12) No rows will return no matter what you do

13) Click Finish, and the result will be that there will be an error message complaining about the connection string being incorrect.

14) Even though the connection string is correct and Test Connection works, the datasource is not created, the report is not created and the String is added to the app.config and the settings. 

What is the real error?

Ivan Hristov
Telerik team
 answered on 09 Jul 2018
1 answer
136 views

Hello,

I am very new to Telerik Reporting and I have downloaded the trial version of it to see if Telerik reporting is able to fulfill the reporting requirements.

Before, I have been using SSRS to generate the reports but I faced some issues and bugs that made me look for other options out there. I have some reports that have quite a complex logic in generating the data that is going to be used on the report. With RDLC, I had created some dataset that would serve as data source for the report and afterwards, I would fill the data on these datasets from code. Moreover, I used to create some partial views that were used for keeping custom parameters. I did not use any parameters on RDLC report, but instead, I would fill the datasets with already filtered data because in this way I keep the logic of data that should be displayed more under control.

What would be the way how to implement the same with Telerik reporting? I mean, can I somehow interfere on the logic how the data are filtered on the report, or maybe use the same approach as I was using with RDLC? I.e., I use some custom parameters via the partial views that I have already created and using these values, I fill the datasets which will serve as data source to the reports? In this way I would not use the filters of Telerik reporting.

To add some complexity logic to this, I have a report which uses two data sources which are basically two datatables of the same dataset. One data source will be used on the header of the report, meanwhile the second one will be used on the details section of the reports. So I will need to apply the filtering on both datasources.

 

I tried to find some solutions to my case, but I am just not sure what would the best approach...

 

Thanks a lot

Epep
Top achievements
Rank 1
 answered on 09 Jul 2018
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?