Is it possible to show a Crystal Reports on Xamarin? RRS feed

  • Question

  • User343482 posted

    Hello there!

    Right now, my apps can show some reports in PDF format: I have a WebApi call that opens a Crystal Report, populate it with updated data, save as PDF, and put it on a shared folder to see it using that popular javascript web viewer through a WebView on the App.

    But our customer wants to watch the Crystal Report itself, because it has navigation (sub-reports, line details data...), so PDF is not good enough. Asking to our SAP expert, he said that there is a lot of plugins to see Crystals on PC and mobile phones, so it can be easy to find a plugin or something to put a report in our APP. So I was looking for some examples or info, and I only found how to do on VS with C#, but no clue on how to show on a Xamarin page or how to open it on a third-party APP (if any).

    Could you give me some advices, point me on the right direction or a link to a blog or something to do that? Or what the customer/expert wants is impossible right now?

    Thank you.

    Monday, December 2, 2019 12:15 PM

All replies

  • User76049 posted

    Unless SAP have written an native viewer for iOS & Android it seems unlikely, I don't think there is an rpt viewer. The fact your asking here suggests you SAP consultant give you less than helpful advice (nothing new there).

    PDF route is the usual approach, for sub-report that require interactivity, maybe implement the report in a webpage and embed that page in a webview (not sure what security concerns would arise from that approach).

    Crystal sucks.

    Monday, December 2, 2019 1:35 PM
  • User343482 posted

    Thank you for your answer.

    First of all, I must say that I had to put "expert" into quotes, because he's not a SAP consultant, but a workmate that has a lot of experience with SAP :D

    That said, I only found some official libraries to work with Crystal, as usual, and they come with some viewer functions, but they work only on VS forms (as far as I could understand). Also, I found an Eclipse plugin: https://www.sap.com/products/crystal-reports-eclipse.html So it looks like it's possible to show a report on a Java program. That means, if I can get the libraries, can I use them in the Android Project to show the report? I think this is way beyond my knowledge, but if I have to implement it, I have to try, so first I need to know if is it possible.

    Epic post closing :D :D :D

    Tuesday, December 3, 2019 9:35 AM
  • User343482 posted

    Ok, I think I have half of the work done, but I can't figure out how to go on with this. The problem is that the solution went offtopic for this forum, and my knowledge on WebViews technology is below than ground level.

    I was able to set a Crystal Report Viewer on a WebView page (aspx), and also, use my authorization code on Page_load to check if the user has been logged in. Wonderful! But now, I need to browse into the report an I don't have any examples of it.

    First time, the page gets a GET http method, so I can load the report with info provided by request params. When I tap on an hyperlink, the page loads again, with a POST http method.

    If I don't do anything on POST, the info I get is the data stored on the report, not what I want with the parameters I passed to it. If I store the report on a static variable on the GET, and use as the source on the POST, I get the info for the parameters I gave to it, but I cannot see the third page, it loads the second every time I hit "next page". If I go to a sub-report, and then try to go to the second page, it loads the second page of the main report.

    I can add some code if you want, but I hope is clear enough, and I don't know if this is too offtopic for this forum, but I really never worked with WebViews before, and it seems the only way to do this.

    Thursday, December 26, 2019 4:29 PM