cancel
Showing results for 
Search instead for 
Did you mean: 

Viewer Options DocPop, OBXAltDocumentSelect Svcembedded in winforms

Smitha_Challa
Star Contributor
Star Contributor

We have a client who wants to view his onbase documents reports in a windows forms application.

The application uses a silverlight control for printing and viewing.  The application opens a web browser control for each report it opens, so each browser control contains the silverlight control. Each report that is open is a new tab which is a new instance of silverlight that is open. Silverlight is no longer supported by Microsoft and we are having issues with printing. So we are trying to find alternatives for Silverlight.  The reports look colorful.. 

Is there a way we can  interface with Onbase’s Report Viewer,DocPop.. Can we open Docpop in a webbrowser control embedded in a windows forms application. 

I was looking at the SDK and there is are some ActiveX controls like OBXAltDocumentSelectSvc Control orOBXAltViewerSvc (onbase 13).  Which one of these would is recommended for the above scenario.

This is an example of how the report shows in the aspx page. The control on the top right side is the silverlight control used mostly for printing.  This whole report does not use any onbase viewer. The code does a   _HttpContext.Response.BinaryWrite( byteData ) to show the report on the page. And for printing there is some more xaml code. I am wondering if there are any onbase viewers. I have 2 options to replace the whole silverlight control: first option is leave the way report is displaying as is and somehow change the print. Is there a printing APi I could use from Onbase? Second Option: Change the viewer to an onbase viewer which comes with its own printing.  I like the first option!!

Thank you

1 ACCEPTED ANSWER

Nathan_Kossover
Star Contributor
Star Contributor

Smitha -

You can indeed write a windows form application using the ActiveX Controls to view a document. We'd recommend using HylandViewer.ocx; OBXAltViewer.ocx is available for backwards compatibility but should not be used for new development in 13+. You can also use this for .aspx pages if needed.

With that said, if using the web is an option (and you did say there were already .aspx pages) it may be a lot easier to use something like DocPop to simply open the document in the web client. That's available out of the box with minimum coding.

Nathan

View answer in original post

13 REPLIES 13

Patrick_Ramser
Star Contributor
Star Contributor
Hey Smitha,

Out of curiosity, is the Silverlight control you're using now custom built? I'm also sorry if this is obvious (given the forum), but is it built on top of the Unity API currently?

Just want imagine the complete picture of the solution. 🙂

Smitha_Challa
Star Contributor
Star Contributor
Hello Patrick, Sorry just saw this comment. It didn't send a notification that someone replied : ). Yes, surely I can give you a full picture
Our client has his own Windows Application. We are hired to make their reports from Onbase viewing, printing, search.. I can send screenshots also if needed. So the windows application connects to their own database and additionally the piece we wrote for them connects to Onbase. It uses asmx to connect to Onbase. We wrote an Aspx page with silverlight plug in embedded. So each time the a report from windows application, an new aspx page is opened with a silverlight . plugin. The plugin is loaded from aspx javascript which calls the service. In the service it connects to onbase and retrieves report stuff as a byte[]. This is the code it uses to retrieve stuff from onbase. Sometimes it takes a start page and end page or some search criteria..
public static byte[ ] GetDocumentData( ISession _Session,
ParametersList _Parameters,
ref PropertiesList _Properties,
ref KeywordPropertiesList _Keywords )
{
if ( OnDMSOnBaseCommandBegin != null )
{
OnDMSOnBaseCommandBegin( _Session );
}

byte[ ] byteData = null;

IRequest request = CreateRequest( GetDocumentDataRequest.GetDocumentData );

if ( _Parameters != null )
{
foreach ( KeyValuePair Parameter in _Parameters )
{
request.AddParameter( Parameter.Key, Parameter.Value );
}
}

IResponse response = RequestExecute( _Session, request );

foreach ( IParameter parameter in response.Parameters )
{
IElement elementParameter = response.Parameters.AccessElement( parameter.Name );
foreach ( string Key in elementParameter.Properties.Keys )
{
if ( Key.Equals( Response.DocumentData ) == true )
{
byteData = System.Convert.FromBase64String( elementParameter.Properties[ Response.DocumentData ] as string );
}
else if ( Key.Equals( Response.PropertyBag ) == true )
{
IPropertyBag propertyBag = elementParameter.Properties[ Key ] as IPropertyBag;
foreach ( string propertyKey in propertyBag.Keys )
{
_Properties.Add( propertyKey, ( string )propertyBag[ propertyKey ] );
}
}
else if ( Key.Equals( Response.KeywordCollection ) == true )
{
IElementList elementList = elementParameter.Properties[ Response.KeywordCollection ] as IElementList;

foreach ( IElement elementProperty in elementList )
{
if ( elementProperty.Name.Equals( Response.Keyword ) == true )
{
IPropertyBag propertyBag = elementProperty.Properties as IPropertyBag;
KeywordProperties keywordProperties = new KeywordProperties( );
foreach ( string propertyKey in propertyBag.Keys )
{
keywordProperties.Add( propertyKey, ( string )propertyBag[ propertyKey ] );
}
_Keywords.Add( keywordProperties );
}
}
}
}
}

Smitha_Challa
Star Contributor
Star Contributor
I guess my question is this: The person who wrote this viewer did not make use of Onbase Viewers and wrote their whole viewing using the silver light control.. Silverlight is no more supported and they are having issues with 32 bit processes. So I am wondering if I could somehow use onbase viewers.. ? Or what would super cool is: If I can just use Onbase printing instead of printing using silverlight code? This is confusing. If there is an email I could send some screenshots too that would be great

Smitha_Challa
Star Contributor
Star Contributor
What is your recommended onbase viewer for customers from aspx pages.. Its not totally a aspx application.. It is a winforms and each report launches in aspx page because of that silverlight. Terrible way to write it but I did not.. Just trying to figure what is a good approach for this problem
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.