views:

156

answers:

2

I have a Powerbuilder file (9.0) with reports (data windows) that i'd like to pass data to and print out of ASP.NET. Is this possible? If so, any guidance? (I don't know Powerbuilder.)

I am currently duplicating the reports in Crystal Reports because it's something i know, but it's tedious to maintain these reports in two place to say the least. The Powerbuilder file is used within a 3rd party application so it's not something that can be eliminated.

+1  A: 

No. There is a PB component (DataWindow .NET) that's available for use in .NET, but you'd have to have the source available and have the app use the component. Your description of it being a third party app means you probably don't have the source nor the ability to jam the component in.

I've heard of some folks putting a trace on the DB connection to sniff data sent to 3d-party apps, but the DW does filtering, formatting, aggregation and a lot of other stuff so you'd have to figure all that out even if you got the data.

Any chance the PB app vendor has a newer version available that might make this available?

DaveE
I doubt there is a newer version. I do have the source for the reports, which we are able to customize.
Josh
Oh - you have InfoMaker? You should be able to plug your DWOs in to the Datawindow.NET then. http://www.sybase.com/products/modelingdevelopment/datawindownet I haven't used it, and our company is not using DWs in our .NET conversion :-(, but you might want to get a trial and see if this works for you.
DaveE
+1  A: 

(Caveat: I haven't tried this.) If you can leverage a PB-generated COM object under ASP.NET, you can create a COM object that retrieves the DataWindow and then get the HTML representation of the report (Describe ("DataWindow.data.html")), then merge that into an HTML page in scripting. There is a code sample that ships with PB9 called WebDW that was originally intended to be a starting point for people using this technology, but I heard of many people that have used this component straight out of the box. There are a lot of settings that control what the resulting HTML looks like, so you should browse the help files for the HTMLGen properties.

Note that there are some limitations to this, like RTF DataWindows and (IIRC) composites.

This is not the right code to use, but this code sample gives you a high level overview.

Good luck,

Terry.

Terry
Thanks - i have a lot to learn about PB if i do it this way, but it looks feasible.
Josh