This is a migrated thread and some comments may be shown as answers.

Can not for the life of me get a Report to run

15 Answers 713 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SSirica
Top achievements
Rank 2
Veteran
Iron
SSirica asked on 15 Feb 2019, 06:59 PM

I have been trying for almost a whole week to get a Telerik report to run.  I'm pretty sure, at this point figuring out nuclear fusion would be easier.  No matter what I do I get the following error:

Cannot access the Reporting REST service. (serviceUrl = '/OmniCareApp/api/reports/'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)

 

I have CORS enabled in my web.config

<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
  </customHeaders>
</httpProtocol>     

 

I can get this to run in a separate web project, but not when I try and integrate it into my legacy system.  I thought maybe it was because it was a web site and not a web project.  So, I created a web project and got the report to run.  Then I brought over all the legacy piece parts, and back to the above error.  Worst case scenario I can create a separate web site just for the purposes of serving up this one report, but then that's just one more thing I have to maintain.  Not the path I'd like to take.

This should have been as easy as placing the Telerik Report Viewer on a form, telling it where the report was and boom...done!  You guys have complicated the ever loving crap out of this process.  I'm frustrated, and disappointed in this process at the same time.  

At my wits end.  I like your reports.  The designer interface is easy to work with, but I never had these kind of problems with Crystal Reports.  

Where do I go next?  For the love of god don't refer me to the multitude of white papers I've already been thru with a fine tooth comb.  I've also found fiddler to be as useless as hair on nipples.

15 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
Veteran
answered on 15 Feb 2019, 08:47 PM

You did not identify the framework used by your website.  Is it Asp.NET/Ajax or MVC oriented?  I suspect the later.

To add a Report to a MVC project you must add the Web API toolkit to your project via NuGet.  You must construct a web service which will provide data to your report when that web service is called by the API you referenced in your "serviceURL".  The URL below should give you some help.  i fully admit it is very cryptic.

https://docs.telerik.com/reporting/html5-report-viewer-quick-start

 

 

Personally I liked the reports PRE-html5.  They were very painless.

 

0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 15 Feb 2019, 09:01 PM

My bad: Asp.Net/Ajax, .net 4.5, VS 2015, and latest Telerik version  2019, 1, 115, 45

Like I said I've been thru about 15 white papers, so yes I did the web api nuget thing, and I have already been thru that quick start link.  Sounds like pre-html5 would have been the way I would have gone.  This API BS is for the birds.  

 

0
David
Top achievements
Rank 1
Veteran
answered on 15 Feb 2019, 09:15 PM

Uh, perhaps you have not tried this?  (It worked)

Created brand new Telerik Web App (asp.net/Ajax C#) project.  TO that project I selected "Add New Item".  From that list, I selected "Telerik HTML5 Report Viewer Page R1 2019" (your flavor may vary).  It t hen asked a few questions.  I allowed it to create a new web service and use a default report.  That resulted in it adding the web api and all related items to my new test project.

The "catch" is that it created a report with the ending of .trdp.  That is new to me.

I then highlighted the "Html5ReportViewer.html" webpage that was added to my code and hit "run".  It ran as needed.

Obviously more work is needed but that should give you a working project to reference.

0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 18 Feb 2019, 02:13 PM

i'm not trying to be a difficult a..hole, but I did say in my original post "I can get this to run in a separate web project, but not when I try and integrate it into my legacy system." 

Just so I'm not spinning my wheels for too long that is the route I'm with going for now.  I'm not happy about it, but I need to move forward. 

0
Todor
Telerik team
answered on 20 Feb 2019, 02:40 PM
Hi SSirica,

Based on the information in the thread I assume that the legacy project is a Web Site, not a Web Application. This is important, as Web Site projects cannot host the Telerik Reporting REST Service. The Web site may host the Html5 Viewer though. However, it will need a separate REST Service to host the Reporting engine - check HTML5 Report Viewer and Reporting REST services. CORS should be enabled in the REST Service. I have attached a short (muted) video demonstrating how to create one from scratch. The video can be played in a browser with installed flash plug-in.
here is also a sample solution with WebSite with embedded Html5 Web Forms Report Viewer, and a separate REST Service project. The service is running on http://localhost:12345/api/reports. Check whether http://localhost:12345/api/reports/formats returns a JSON with the available rendering formats - this will indicate a working service.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 20 Feb 2019, 04:23 PM

Your assumption is 1/2 right.  The original project was a web site, but I took the time to convert it over to a web application and the result was exactly the same.  Thanks for including some samples to look at. 

Truth be told, these reports are painful to work with.  They're fine for people who have something simple to do, but god forbid you want to do anything dynamically.  It was be easier to get out of one of Jigsaw's contraptions.  We have multiple clients that each have their own connection string based on what we call a market.  Each time one of these reports is run the connection string could be different.  Looks like if I create a shared connection string it gets saved in a user.config file at C:\Users\NameHere\AppData\Local\Progress_Software_Corpora\Telerik.ReportDesigner.ex_StrongName_xvg2ahozm2u22wxtsw2egsvlddrzt5hj\13.0.19.116...how does that translate to a deployed application?  There has to be a better way to tell the report where to get it's connection strings?  I tried going the route of passing in the connection string info as a parameter then setting the datasets connection string to the report parameter...the report laughed at me and spit in my face. 

Every time I think I've turned a corner with this product another Trump sized Mexican wall goes up in my path. 

0
Accepted
Todor
Telerik team
answered on 25 Feb 2019, 01:07 PM
Hi SSirica,

Thank you for the feedback. Indeed, there is a learning curve when starting with our product, and it will be necessary to get used to some specifics. I hope the resources provided with the previous post will help. The REST Service is the application where our Reporting engine is running, and it is a must for the Html5 Web viewers.

Generally, the named connection string should be declared in the application configuration file, i.e. in an ASP.NET application, this would be the Web.config file. In the case of the Standalone designer, this would be the Telerik.ReportDesigner.exe.config file - by default in the (Telerik Reporting installation folder)\Report Designer (e.g. C:\Program Files (x86)\Progress\Telerik Reporting R1 2019\Report Designer).
The data saved in the User's local folder is the cache of the designer that holds the last opened reports, the configured data connections, etc. It may be deleted and will be regenerated upon re-opening the designer. The only consequence will be that the designer will have no history of what has been recently opened/created.

The approach we suggest for the multitenancy scenario is described in the Change Connection String dynamically through a report parameter KB article. The only scenario it cannot be used is when the Report Parameters get their Available Values from a SqlDataSource, which connection string should also be provided dynamically.

You may consider opening a support ticket where to attach the project so that we may take a look at it and make more suggestions.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 25 Feb 2019, 03:18 PM

Between posts, I figured out that the design time and run time the connection strings are stored in different places.  And if I just a "Static" value it finds the connection strings perfectly fine, but when I use the method described in the above supplied link I get an error.  It doesn't matter what I send in the parameter whether it be the shared connection name or the full connection string I get an error everytime.  It's like the report can't figure out that Parameters.ConnStr.Value has the value "SAMP1" in it.  Like I said same results if I send an actual connection string.

Either way, I've moved on.  I figured out that I can control the data that is feed to the report by using the Web Service Data Source.  The report has no connection worries it just processes what I give it. 


0
Todor
Telerik team
answered on 28 Feb 2019, 11:44 AM
Hi SSirica,

Could you specify the error when providing the connection string through a report parameter?
You may open a support ticket and send us the report with some sample database so that we can try to configure it for you.

When using the designer the report is rendered in the context of the designer application, whereas when using a viewer the report is running in the context of the viewer or the Telerik Reporting REST Service that it uses. The connection string is read from the corresponding configuration file.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 28 Feb 2019, 03:08 PM

It doesn't matter, I went a different route.  I now feed the report via a Web Service Data Source.  I can control the data and the connection better. 

What these reports need is better programatic access to their objects.  They are easy to design...they are not easy to work with if you operate in a dynamic environment.  We don't do anything static.  Our web apps are either hosted here or get deployed to our customers.  Almost every part of of our system is customizable by our customers, so no 2 setups are the same.  We have to program everything to be dynamic.  I finally got my report(Invoice) working the way I want it, but it was quite the struggle.  I took a few hours to design the report but like 2 weeks to tweak the right environment to get it to render properly.  

0
Todor
Telerik team
answered on 05 Mar 2019, 11:08 AM
Hello SSirica,

Thank you for the feedback.
Generally, we recommend designing a report with our dedicated Report Designers. We do not recommend modifications in reports with code run-time. We have provided other means for controlling the report layout dynamically. You may use Report ParametersExpressions, Bindings, Conditional Formatting.
For the scenarios where the above approaches are not suitable, we have exposed the Telerik Reporting API. We agree that it may be necessary to expose more properties/methods of our objects. We would appreciate any particular scenario that cannot be achieved with the currently exposed API to help us decide what else to disclose.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 05 Mar 2019, 08:39 PM

I'm not sure what post lead you to believe I was modifying reports via run-time code, but that couldn't be further from the truth.  It make me wonder if you actaully read the responses.  The only thing I was trying to set dynamically was the connection string.  I tried the methods you described above and not a single one of them worked as advertised...for my situation.  I'm sure they work like a charm for eveyone else.

In football I think you would call my final solution an end around.  I stayed on the field and came up with my own creative solution and got the touchdown.

I will mark one of your repsonses as the answer just to put this thread to rest.  

0
CB
Top achievements
Rank 2
answered on 20 Apr 2020, 12:41 AM

Hi SSirica,

HS, I feel your pain - I've just run into the very same problem earlier today and at this point I'd rather tenderise my tongue with a mallet than continue fiddling around getting legacy reports to work with the HTML5 viewer - it is really over complicated and like you, I don't want to deploy a seperate reports service.

Aggghhhh!

CB.

 

0
SSirica
Top achievements
Rank 2
Veteran
Iron
answered on 20 Apr 2020, 12:52 PM
Yeah it was a painful process.  Now as long as no one ever wants to make a change to the report I should be good.  LOL
0
Doug
Top achievements
Rank 1
answered on 09 May 2020, 04:29 AM

Nice to see other people wanting to poke their eyes out. This is WAY TOO cumbersome and cryptic.

Tags
General Discussions
Asked by
SSirica
Top achievements
Rank 2
Veteran
Iron
Answers by
David
Top achievements
Rank 1
Veteran
SSirica
Top achievements
Rank 2
Veteran
Iron
Todor
Telerik team
CB
Top achievements
Rank 2
Doug
Top achievements
Rank 1
Share this question
or