If you are unable to create a new account, please email support@bspsoftware.com

 

Passing parameters through URL from Java application to ReportNet

Started by king, 16 Feb 2007 07:35:25 AM

Previous topic - Next topic

king

I have a request from my client to run a report from Java application and get the output in ReportNet.
(i.e.,) The prompt page will be in Java application.  Once user clicks submit button, the parameter should be passed to CRN server and the output should be displayed in Report Studio.

I know we can achieve this through SDK.  However, the requirement is to just pass the url values to CRN. I dont want to install & configure SDK to this functionality alone.

Any other round-abouts, which I can use to pass value and get output.

Thanks in advance,
king.

wilbolite

Unfortunately, I think the SDK is the only way to go.  We have a desktop Java app that makes calls to the ReportNet engine to create and return a PDF based on returned parameters - and it works rather elegantly.

However, with the security model around ReportNet, I don't think you'll be able to get any objects returned back to you based only on a single URL.  The SDK is certainly worth it as it opens up a world of opportunity to utilize ReportNet in various applications.

JoeBass

I've done that with Delphi.  You just need to be able to open a browser and pass a URL that you construct in your code. 

------------------------

This Delphi snippet opens a browser and runs a report with a single parameter that the user chooses in the application.  The user is required to login to view the report.

//Open IE Code From - http://www.chami.com/tips/delphi/110396D.html
procedure TMainF.OpenInternetExplorer(sURL : string);
const
   csOLEObjName = 'InternetExplorer.Application';
var
   IE  : Variant;
   WinHandle : HWnd;
begin
   if( VarIsEmpty( IE ) )then
      begin
         IE := CreateOleObject( csOLEObjName );
         IE.Visible := true;
         IE.Navigate( sURL );
      end
   else
      begin
         WinHandle := FindWIndow( 'IEFrame', nil );
         if( 0 <> WinHandle )then
            begin
               IE.Navigate( sURL );
               SetForegroundWindow( WinHandle );
            end
         else
            begin
                // handle error ...
         end;
      end;
end;

//Seeds from http://www.tek-tips.com
procedure TMainF.WithVendorMIClick(Sender: TObject);
begin
   if StartupCB.Text <> '' then
      OpenInternetExplorer('http://www.yourserver.com/crn/cgi-bin/cognos.cgi?'; +
      'b_action=xts.run&m=portal/report-viewer.xts&method=' +
      'execute&m_obj=%2fcontent%2fpackage%5b%40name%3d%27' +
      'YourPackage%27%5d%2freport%5b%40name%3d%27' +
      'YourReport%27%5d&backURL=%2fcrn%2fcgi-bin' +
      '%2fcognos.cgi%3fb_action%3dxts.run%26m%3dportal%2fcc.' +
      'xts%26m_path2%3d~%252ffolder%26m_path%3d%252fcontent%' +
      '252fpackage%255b%2540name%253d%2527YourPackage%2527%255d'+
      '&prompt=false' +
      '&YourParameterName=' + YourParameterValue);
end;