We are developing a web site (ASP.Net MVC 5 with C#) for an existing application(Client/server) developed on PowerBuilder 12.5(Classic) + SQLServer 2014. We would like to use the same reports that are designed in our PB app, to save time on redesigning and future maintenance. We have read that it is possible to use .Net assemblies developed with PB.Net in C#. Just could not find the right resources for presenting a datawindow in an MVC website.
Trial#1:
Tried exporting the html from the dw report, which does not render all fields properly. dw_1.Describe("DataWindow.data.html")
. Changing the html table properties (in dw) did not make much of a difference other than the borders and text color. Background colors, conditionally visible fields, lines do not render properly, not even close. Maybe we are doing it wrong and somebody could enlighten us.
Another option we are working on, till we find a better solution is to run a WCF service, or an individual app which can be called from our website, to generate the reports in the desired format and allow user to download as a file.
Desperately seeking helpful resources and feedback.
I've had some success with both method's you've indicated.
With the datawindow HTML method, I did not try it using a dataobject as complicated as the one you're trying, but by turning on the 'Generate CSS' property and some minor fiddling with the positions of various controls i was able to get a very close representation of the datawindow in HTML.
As for the download file method, what i did was to create a .net assembly using powerbuilder classic which would retrieve the report(datastore) and convert it to a PDF using ghostscript. Then I consumed this assembly in a c# web api and was able to download the file to a mobile app.
hope this helps.