on 09-05-2008 4:19 PM
I'm trying to get the VB viewer code from wssdk_net_samples_12 working on a report (with 1 parameter) I created against a postgres database but I keep getting the following error:
Message: "Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"
on this line:
Dim boDocInfo As DocumentInformation = boRepEng.GetDocumentInformation(repID, boMustFill, oActions, Nothing, Nothing)
The logon apprears to work properly. I've tested it against the standard 'World Sales Report' report.
My report works fine in Crystal Server 2008 with the parameter so I'm wondering what I'm missing.
The code to log into the DB is actually done after this code.
I'm actually at the end of what little wit I have.
Any help would be greatly appreciated.
Thanks in advance,
J
Edited by: Jason Cameron on Sep 5, 2008 5:19 PM
Hi Jason,
What version of VB are you using? Currently we do not have a .NET SDK for running reports from Crystal Reports Server 2008. We do have the .NET SDK for running stand-alone unmanaged reports. If you are using this I can point you to a logon sample if you like?
Trevor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmm, ouch.
Do you mean that there will be a SDK this quarter(before end of September)?
I'm going to have to keep plugging away then. I get the same issue in Java as well. It's downright bizarre. All I'm trying to do is run a report with parameters and have it spit back a PDF. I've got the logging in down pat. It looks like there's an issue with the boMustFill object.
Oh well looking forward to it... and if anyone happens to have an unsupported SDK (with instructions) I'll look at that too!
Thanks in advance,
J
Hello Jason,
If you go to [https://boc.sdn.sap.com/developer/library], then you should see the links for the Crystal Reports .NET and in-proc RAS .NET SDK documentation.
Some points on your original post:
The .NET Framework is fully supported with Crystal Reports Server 2008 using the ReportEngine Web Services, which you were originally trying to use.
I don't think PostgreSQL is currently yet on the supported platforms list.
A future Service Pack for Crystal Reports Server 2008 should bring in support for the other .NET SDKs - Enterprise .NET SDK and Crystal Reports .NET Integration.
End of September is the scheduled, but not confirmed, release of BusinessObjects Enterprise XI 3.0 Service Pack 1 - Crystal Reports Server 2008 Service Packs usually follows the release of Enterprise Service Packs.
By the way, would you be trying to call a parametrized stored procedure on PostgreSQL? Otherwise, how is the parameter being used in the report?
Sincerely,
Ted Ueda
I just tried the web service tutorial and I got an error.
Dim boConnection As Connection = Nothing
Dim boConString As String = "http://localhost:8081/dswsbobje/services/Session"
boConnection = New Connection(boConString)
Dim boCredential As New BusinessObjects.DSWS.Session.EnterpriseCredential
boCredential.Login = "Administrator"
boCredential.Password = "Password"
Dim boSession As New BusinessObjects.DSWS.Session.Session(boConnection)
The last line is what caused the error:
CallStackTrace: " at BusinessObjects.DSWS.Session.Session.CreateStub()
at BusinessObjects.DSWS.Consumer..ctor(Connection objConnection, ConnectionState objConnectionState, String strWebServiceMethod)"
CauseDetail: Nothing
CauseException: "FileNotFoundException"
CauseID: Nothing
CauseMessage: "Could not load file or assembly 'Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
Data: {System.Collections.ListDictionaryInternal}
HelpLink: Nothing
ID: "http://session.dsws.businessobjects.com/2007/06/01/constructor"
InnerException: Nothing
Message: "constructor exception (Error: WSE 99999)"
Operation: "http://session.dsws.businessobjects.com/2007/06/01/constructor"
Source: "DSWS Web Service Consumer"
StackTrace: " at BusinessObjects.DSWS.Consumer..ctor(Connection objConnection, ConnectionState objConnectionState, String strWebServiceMethod)
at BusinessObjects.DSWS.Session.Session..ctor(Connection connection)
at _Default.Page_Load(Object sender, EventArgs e) in C:\My Documents\Visual Studio 2005\WebSites\CRS2008T1\Default.aspx.vb:line 24"
TargetSite: {System.Reflection.RuntimeConstructorInfo}
WebServiceID: ""
Do I have to install WSE 3.0?
I was going to try and use the RAS again from scratch and see how my luck held out but I'm guessing in order to connect to Crystal Server 2008 I need to use WebServices. I tried the CR2008 SDK docs link at the bottom of the SDK screen but all the links on the resulting page seem to point to SAP World. Trying to find docs there is ... challenging.
I can use Crystal Reports with PostgreSQL with relatively few problems using a command object. At the moment my test report is just using a string to populate the where clause in a simple query. Nothing too complicated. (It works in stand-alone Crystal Reports as well as on the Crystal Server.)
J
Edited by: Jason Cameron on Sep 16, 2008 10:12 PM (RAS was a bad idea I think. Need to develop against CRS2008)
Ok quick update. Apparently the application requires WSE 3.0. Downloaded from Microsoft and it doesn't die on that line... yay! It dies on the next line (boo!):
Dim boSI As BusinessObjects.DSWS.Session.SessionInfo = boSession.Login(boCredential)
Now I have a new error:
{"GetInstance exception (Error: WRE 99999)"}
CallStackTrace: " at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at BusinessObjects.DSWS.Consumer.GetConsumer(String strWebServiceMethod, String strWSType, String strWSUrl)"
CauseDetail: "constructor exception (Error: WRE 99999)"
CauseException: "TargetInvocationException"
CauseID: Nothing
CauseMessage: "Exception has been thrown by the target of an invocation."
Data: {System.Collections.ListDictionaryInternal}
HelpLink: Nothing
ID: "http://reportengine.dsws.businessobjects.com/2005/GetInstance"
InnerException: Nothing
Message: "GetInstance exception (Error: WRE 99999)"
Operation: "http://reportengine.dsws.businessobjects.com/2005/GetInstance"
Source: "DSWS Web Service Consumer"
StackTrace: " at BusinessObjects.DSWS.Consumer.GetConsumer(String strWebServiceMethod, String strWSType, String strWSUrl)
at BusinessObjects.DSWS.ReportEngine.ReportEngine.GetInstance(Consumer consumer, String reportEngineURL)
at _Default.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\My Documents\Visual Studio 2005\WebSites\CRS2008T1\Default.aspx.vb:line 31"
TargetSite: {System.Reflection.RuntimeMethodInfo}
WebServiceID: ""
No idea what this error means though.
J
Here's the complete code I'm trying out.
Dim boConnection As Connection = Nothing
Dim boConString As String = "http://localhost:8081/dswsbobje/services/Session"
boConnection = New Connection(boConString)
Dim boCredential As New BusinessObjects.DSWS.Session.EnterpriseCredential
boCredential.Login = "Administrator"
boCredential.Password = "Password"
Dim boSession As New BusinessObjects.DSWS.Session.Session(boConnection)
Dim boSI As BusinessObjects.DSWS.Session.SessionInfo = boSession.Login(boCredential)
'Report Engine
Dim strBORepEngURL As String = boSession.GetAssociatedServicesURL("ReportEngine").ToString
Dim boRepEng As ReportEngine.ReportEngine = ReportEngine.ReportEngine.GetInstance(boSession, strBORepEngURL)
'retrieve pdf
Dim pdfViewSupport As New BusinessObjects.DSWS.ReportEngine.ViewSupport
With pdfViewSupport
.OutputFormat = ReportEngine.OutputFormatType.PDF
.ViewType = ReportEngine.ViewType.BINARY
.ViewMode = ReportEngine.ViewModeType.DOCUMENT
End With
Dim retBinView As New ReportEngine.RetrieveBinaryView
retBinView.ViewSupport = pdfViewSupport
Dim retBOData As New ReportEngine.RetrieveData
retBOData.RetrieveView = retBinView
Dim docInfo As ReportEngine.DocumentInformation = boRepEng.GetDocumentInformation("1007", Nothing, Nothing, Nothing, retBOData)
'logout
boSession.Logout()
Hmm you're right. It dies at the line:
Dim boRepEng As ReportEngine.ReportEngine = ReportEngine.ReportEngine.GetInstance(boSession, strBORepEngURL)
Now I installed CRS2008 server before VS2005. Does that make a difference?
J
The first thing I would do is print out the string
boSession.GetAssociatedServicesURL("ReportEngine").ToString
you're passing in. You'd likely see something unexpected.
The DSWS assemblies aren't placed in the GAC or registered with Visual Studio, so for Web Services the order of installation should not matter (it does for the Crystal SDKs).
Sincerely,
Ted Ueda
lol! I just checked that out (~45 seconds ago).
As you suspected when I print strBORepEngURL I get "System.String[]". I thought it was weird that it was passing back an array. Actually when I was translating the code from C# to VB I thought it was just an array of characters aka string (which C++ is known to do). Now when I change that line to
Dim strBORepEngURL As String = boSession.GetAssociatedServicesURL("ReportEngine")(0)
it works as expected.
Ok I'm going to continue on with the tutorial example and if there are no more problems I'm going to be a very happy camper. (crossing fingers)
J
Wow. Talk about coming full circle. I now run into the error I originally got when I tried to run the sample:
{"Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"}
CallStackTrace: "com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: Information is needed before this report can be processed.---- Error code:-2147213303 Error code name:invalidParameterField
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException.throwReportSDKParameterFieldException(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPromptDatabaseLogOnInfos(Unknown Source)
at com.businessobjects.dsws.wsc.reportengine.Report.getDBLogonsInfo(Unknown Source)
at com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleRetrieveMustFillInfo(Unknown Source)
at com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleActions(Unknown Source)
at com.businessobjects.dsws.wsc.reportengine.CrystalReportEngineSoapImpl.getDocumentInformation(Unknown Source)
at com.businessobjects.dsws.reportengine.ReportEngineSoapImpl.getDocumentInformation(Unknown Source)
at com.businessobjects.dsws.reportengine.ReportEngineSkeleton.getDocumentInformationByMTOM(Unknown Source)
at com.businessobjects.dsws.reportengine.ReportEngineMessageReceiverInOut.invokeBusinessLogic(Unknown Source)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.businessobjects.dsws.wsc.common.axis.FlashFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
"
CauseDetail: "Information is needed before this report can be processed."
CauseException: "com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException"
CauseID: Nothing
CauseMessage: "Information is needed before this report can be processed."
Data: {System.Collections.ListDictionaryInternal}
HelpLink: Nothing
ID: "2517"
InnerException: Nothing
Message: "Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"
Operation: "reportengine.dsws.businessobjects.com/getDocumentInformation"
Source: "DSWS Web Service Consumer"
StackTrace: " at BusinessObjects.DSWS.ReportEngine.ReportEngine.GetDocumentInformation(String documentReference, RetrieveMustFillInfo retrieveMustFillInfo, Action[] actions, Navigate navigate, RetrieveData retrieveData)
at _Default.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\My Documents\Visual Studio 2005\WebSites\CRS2008T1\Default.aspx.vb:line 61"
TargetSite: {System.Reflection.RuntimeMethodInfo}
WebServiceID: ""
And here is the code I'm running(The ID for the report I'm running is 1007.)
Imports BusinessObjects.DSWS
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
'reportid is 1007
'Connection
Dim boConnection As Connection = Nothing
Dim boConString As String = "http://localhost:8081/dswsbobje/services/Session"
boConnection = New Connection(boConString)
Dim boCredential As New BusinessObjects.DSWS.Session.EnterpriseCredential
boCredential.Login = "Administrator"
boCredential.Password = "Password"
Dim boSession As New BusinessObjects.DSWS.Session.Session(boConnection)
Dim boSI As BusinessObjects.DSWS.Session.SessionInfo = boSession.Login(boCredential)
'Report Engine
Dim strBORepEngURL As String = boSession.GetAssociatedServicesURL("ReportEngine")(0)
Dim boRepEng As ReportEngine.ReportEngine = ReportEngine.ReportEngine.GetInstance(boSession, strBORepEngURL)
'Getting Prompts
Dim fillInfo As New BusinessObjects.DSWS.ReportEngine.RetrieveMustFillInfo
Dim promtInfo As New BusinessObjects.DSWS.ReportEngine.RetrievePromptsInfo
fillInfo.RetrievePromptsInfo = promtInfo
Dim actions(1) As BusinessObjects.DSWS.ReportEngine.Action
actions(0) = New BusinessObjects.DSWS.ReportEngine.Refresh
'retrieve pdf
Dim pdfViewSupport As New BusinessObjects.DSWS.ReportEngine.ViewSupport
With pdfViewSupport
.OutputFormat = ReportEngine.OutputFormatType.PDF
.ViewType = ReportEngine.ViewType.BINARY
.ViewMode = ReportEngine.ViewModeType.DOCUMENT
End With
Dim retBinView As New ReportEngine.RetrieveBinaryView
retBinView.ViewSupport = pdfViewSupport
Dim retBOData As New ReportEngine.RetrieveData
retBOData.RetrieveView = retBinView
Dim docInfo As ReportEngine.DocumentInformation = boRepEng.GetDocumentInformation("1007", fillInfo, actions, Nothing, retBOData)
'logout
boSession.Logout()
Catch ex As DSWSException
Console.WriteLine(ex.Message)
End Try
End Sub
End Class
Can anyone explain that error to me and tell me what I'm doing wrong? I thought I was passing in the correct info...
It's dying on: Dim docInfo As ReportEngine.DocumentInformation = boRepEng.GetDocumentInformation("1007", fillInfo, actions, Nothing, retBOData)
J
Edited by: Jason Cameron on Sep 17, 2008 8:56 PM
Hmmm well when I uncheck the Prompt when viewing I don't get an error (I don't get any prompts either.) It's only when I put Prompt when viewing that I get that error.
So in theory there's something in my parameter declaration in code that's wonky. (either that or the way the report was put into CMS is wonky which I doubt because I can run it fine in the CMS)
Having done all this work to just wind up at the same error is somewhat disheartening but at least I have some (vague) idea what's going on.
J
p.s. After this all I need to do is figure out how to save it to PDF and I'll be done! yay!
Something to get you started - prompts, db logon then export to HTML:
protected void Page_Load(object sender, EventArgs e) {
// Document path
string crPath = FixedPaths.InfoObjects.ROOT_FOLDER + "/302782727/302782727_sp@SI_ID";
// Enterprise Web Services URL and Login Credentials.
string boSessionURL = "http://tueda-bexir2s2:8080/dswsbobje/services/session";
string boCMSName = "TUEDA-BEXIR2S2";
string boAuthType = "secEnterprise";
string boUsername = "Administrator";
string boPassword = "";
Session boSession = null;
try {
// Logon to Enterprise
EnterpriseCredential boCredential = new EnterpriseCredential();
boCredential.Domain = boCMSName;
boCredential.AuthType = boAuthType;
boCredential.Login = boUsername;
boCredential.Password = boPassword;
boSession = new Session(new Connection(boSessionURL));
boSession.Login(boCredential);
// Retrieve Document CUID
BIPlatform biPlatform
= BIPlatform.GetInstance(boSession, boSession.GetAssociatedServicesURL("BIPlatform")[0]);
ResponseHolder rh = biPlatform.Get(crPath, null);
string doc_cuid = rh.InfoObjects.InfoObject[0].CUID;
// Retrieve ReportEngine service.
ReportEngine reportEngine
= ReportEngine.GetInstance(boSession, boSession.GetAssociatedServicesURL("ReportEngine")[0]);
// Refresh document and retrieve the prompts.
RetrieveMustFillInfo retrieveInfo = new RetrieveMustFillInfo();
retrieveInfo.RetrievePromptsInfo = new RetrievePromptsInfo();
DocumentInformation doc
= reportEngine.GetDocumentInformation(doc_cuid, null, new Action[] { new Refresh() }, null, null);
string docRef = doc.DocumentReference;
doc = reportEngine.GetDocumentInformation(docRef, retrieveInfo, null, null, null);
docRef = doc.DocumentReference;
int promptCount = doc.PromptInfo == null ? 0 : doc.PromptInfo.Length;
FillPrompt[] fillPromptList = new FillPrompt[promptCount];
int i = 0;
foreach(PromptInfo promptInfo in doc.PromptInfo) {
fillPromptList<i> = new FillPrompt();
fillPromptList<i>.ID = promptInfo.ID;
DiscretePromptValue dvalue1, dvalue2;
dvalue1 = new DiscretePromptValue();
dvalue1.Value = "5";
fillPromptList<i>.Values = new PromptValue[] {dvalue1};
i++;
Response.Write(promptInfo.ID + "<BR>");
}
FillPrompts fillPrompts = new FillPrompts();
fillPrompts.FillPromptList = fillPromptList;
doc = reportEngine.GetDocumentInformation(docRef, null, new Action[] {fillPrompts}, null, null);
docRef = doc.DocumentReference;
retrieveInfo = new RetrieveMustFillInfo();
retrieveInfo.RetrieveDBLogonInfo = new RetrieveDBLogonInfo();
doc = reportEngine.GetDocumentInformation(docRef, retrieveInfo, null, null, null);
docRef = doc.DocumentReference;
DBLogonInfo[] dbLogonInfos = doc.DBLogonInfos;
FillDBLogon[] dbLogon = new FillDBLogon[1];
dbLogon[0] = new FillDBLogon();
dbLogon[0].Name = dbLogonInfos[0].Name;
dbLogon[0].UserName = "vantech";
dbLogon[0].Password = "vantech";
FillDBLogons dbLogons = new FillDBLogons();
dbLogons.FillDBLogonList = dbLogon;
doc = reportEngine.GetDocumentInformation(docRef, null, new Action[] { dbLogons} , null, null);
docRef = doc.DocumentReference;
RetrieveData retrieveData = new RetrieveData();
RetrieveView retrieveView = new RetrieveView();
ViewSupport viewSupport = new ViewSupport();
viewSupport.OutputFormat = OutputFormatType.HTML;
viewSupport.ViewType = ViewType.CHARACTER;
viewSupport.ViewMode = ViewModeType.REPORT_PAGE;
retrieveView.ViewSupport = viewSupport;
retrieveData.RetrieveView = retrieveView;
doc = reportEngine.GetDocumentInformation(docRef, null, null, null, retrieveData);
docRef = doc.DocumentReference;
String content = ((CharacterView) doc.View).Content;
// Close document connection.
doc = reportEngine.GetDocumentInformation(docRef, null, new Action[] { new Close() }, null, null);
// Output view to web browser.
Response.Write(content);
} finally {
if(boSession != null)
boSession.Logout();
}
}
Sincerely,
Ted Ueda
Thank you Ted for your sample, I was able to get it to run with relatively few modifications. (document path and CMS Name. Unfortunately it still dies at roughly the same place for me.
doc = reportEngine.GetDocumentInformation(docRef, retrieveInfo, null, null, null);
It's something to do with that retrieveInfo that's messing me up. It keeps telling me:
CauseException: "com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException"
CauseID: null
CauseMessage: "Information is needed before this report can be processed."
ID: "2517"
Message: "Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"
J
Where is the parameter in the report - is it a SQL Command Table parameter, stored procedure parameter, or a plain old regular parameter?
Are you using any dynamic parameters, such as dynamic cascading parameters?
If the parameter is dynamic, then that won't accessible supported through ReportEngine Web Services.
If not - do you have a support contract with SAP Business Objects? You can open a support ticket - SAP Incident - to have someone here look into this.
Sincerely,
Ted Ueda
Hmm I'm not sure what you mean by "SQL Command Table parameter, stored procedure parameter, or a plain old regular parameter" so I'll just describe briefly a test report I'm using.
I'm using the database that you can connect to using the ODBC connection Xtreme Sample Database 11.
Once in the Standard Report Creation Wizard I clicked "Add Command".
I then typed in:
select * from Customer where [Customer ID] =
I created a number parameter custid so the resulting SQL is
select * from Customer where [Customer ID] = {?custid}
It works in Crystal. Is that considered a dynamic parameter?
J
You're using a parametrized SQL Command Table.
Are you using an older version of XI Release 2 or XI 3.0?
There was an issue with earlier editions of XI Release 2 where parametrized Command Tables and Stored Procedures would get issues similar to yours. It should be fixed in the latest Service Packs for XI Release 2 or for XI 3.0.
But my recommendation would be to not use a Command Table, but rather, allow Crystal Reports to generate the SQL itself - it'll generally more efficient. Then, you'd create the parameter field and specify the record selection formula in the report (using the Report Selection Formula menu option).
Sincerely,
Ted Ueda
The report was created in Crystal Reports XI(11.0.0.2495).
The server is Crystal Reports Server 2008.
Usually I create an Stored Procedure and let Crystal do the rest. Our reports have to be multi-database though. So we're creating the SQL on the fly and sending it directly to Crystal. If that doesn't work I'll have to find a way around it. Ironically, I learned about that technique while working at BObj.
j
Well I've tried to create as simple a test as possible.
I've started with two clean installs of XP. I installed CR2008 on one and CR2008 Server on the other.
My dev machine has Visual Studio 2005 with the latest SP and SQL 2005 with the latest SP.
I created a table(TestTable) with two columns (TestID int, TestName nvarchar(200)) and created the Stored Procedure TestGet(Select TestID, TestName from TestTable Where TestID=@TestID)
I created the report in CR2008 (with TestGet as the source) and uploaded it to CR2008 Server.
The report runs fine by itself in CR2008 and in CR2008 Server.
I ran Ted's code and it gets to the line:
doc = reportEngine.GetDocumentInformation(docRef, retrieveInfo, null, null, null);
with the error:
{"Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"}
base {System.Exception}: {"Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"}
CallStackTrace: "com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: Information is needed before this report can be processed.---- Error code:-2147213303 Error code name:invalidParameterField\n\tat com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException.throwReportSDKParameterFieldException(Unknown Source)\n\tat com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)\n\tat com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPromptDatabaseLogOnInfos(Unknown Source)\n\tat com.businessobjects.dsws.wsc.reportengine.Report.getDBLogonsInfo(Unknown Source)\n\tat com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleRetrieveMustFillInfo(Unknown Source)\n\tat com.businessobjects.dsws.wsc.reportengine.DocumentAgent.handleActions(Unknown Source)\n\tat com.businessobjects.dsws.wsc.reportengine.CrystalReportEngineSoapImpl.getDocumentInformation(Unknown Source)\n\tat com.businessobjects.dsws.reportengine.ReportEngineSoapImpl.getDocumentInfo
rmation(Unknown Source)\n\tat com.businessobjects.dsws.reportengine.ReportEngineSkeleton.getDocumentInformationByMTOM(Unknown Source)\n\tat com.businessobjects.dsws.reportengine.ReportEngineMessageReceiverInOut.invokeBusinessLogic(Unknown Source)\n\tat org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)\n\tat org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)\n\tat org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)\n\tat org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)\n\tat org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:709)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:802)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)\n\tat org.apache.catalina.core.ApplicationFilterChain.do
Filter(ApplicationFilterChain.java:173)\n\tat com.businessobjects.dsws.wsc.common.axis.FlashFilter.doFilter(Unknown Source)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)\n\tat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)\n\tat org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11Base
Protocol.java:664)\n\tat org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)\n\tat org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)\n\tat org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)\n\tat java.lang.Thread.run(Thread.java:595)\n"
CauseDetail: "Information is needed before this report can be processed."
CauseException: "com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException"
CauseID: null
CauseMessage: "Information is needed before this report can be processed."
ID: "2517"
Message: "Failed to retrieve database logon info. Information is needed before this report can be processed. (WRE 02517)"
Operation: "reportengine.dsws.businessobjects.com/getDocumentInformation"
WebServiceID: ""
I keep getting this WRE 02517 error and I have no idea what it is.
j
Thanks again, I've not seen that document before. I'll reading up on it now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
I hope you don't mind but I am going to mark this posting as resolved. It appears you have resolved your original issue and have moved onto another part. If you still need help start a new post regarding your URL reporting question would be best. You may also want to search forums on the same, your questions may already be answered.
Thank you
Don
That would be great! Thanks a lot! .....my head feels bloody at this point from banging it against the wall so many times in the last couple of weeks....lol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jason,
I hate to sound helpless here, but do you have the code you are referring to that you were able to get working? Did you accomplish it by ignoring the BO dlls all together and using only their web services somehow?
-Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jason,
Thanks for the post. I see that you've scheduled this but unfortunately I have to be able to display the report directly on the screen. Have you been able to get it to work without the scheduler?
-Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
'Hey there, sorry about the delay...and the mess. Here's my code and it still works! Ok some of this is 'mine, some of this is BObj's, and some of this was done by people here. I can't remember exactly who 'but if you recognize a piece of code in there that might be yours it probably is. Thanks. This is a pretty 'messy windows command-line app to schedule a report and put it in a specific location.
'j
Imports BusinessObjects.DSWS
Imports BusinessObjects.DSWS.BIPlatform
Imports BusinessObjects.DSWS.BIPlatform.Constants
Imports BusinessObjects.DSWS.BIPlatform.Desktop
Imports BusinessObjects.DSWS.BIPlatform.Dest
Imports BusinessObjects.DSWS.ReportEngine
Imports BusinessObjects.DSWS.Session
Imports System
Imports System.Data
Imports System.Configuration
Public Class ModuleMainClean
Private WS_URL_SESSION As String
Private WS_URL_REPORTENGINE As String
Private WS_URL_BIPLATFORM As String
Private REPORT_STRING As String
Private REPORT_NAME As String
Private FILE_EXTENSION As String
Private REPORT_FORMAT As ReportFormatEnum
Private bipService As BIPlatform
Private boRepEng As ReportEngine
Private wSession As Session
Private gstrReportParameters() As String
Sub Main()
SetupEnvironment()
Logon()
Schedule()
End Sub
Sub SetupEnvironment()
Dim c As Integer
WS_URL_SESSION = My.Settings.BaseURL + "Session"
WS_URL_REPORTENGINE = My.Settings.BaseURL + "reportengine"
WS_URL_BIPLATFORM = My.Settings.BaseURL + "BIPlatform"
REPORT_STRING = My.Application.CommandLineArgs(0)
REPORT_NAME = My.Application.CommandLineArgs(1)
REPORT_FORMAT = System.Enum.Parse(GetType(ReportFormatEnum), My.Application.CommandLineArgs(2))
Select Case REPORT_FORMAT
Case ReportFormatEnum.CRYSTAL_REPORT
FILE_EXTENSION = ".rpt"
Case ReportFormatEnum.EXCEL, ReportFormatEnum.EXCEL_DATA_ONLY
FILE_EXTENSION = ".xls"
Case ReportFormatEnum.MHTML
FILE_EXTENSION = ".mhtml"
Case ReportFormatEnum.PDF
FILE_EXTENSION = ".pdf"
Case ReportFormatEnum.RTF, ReportFormatEnum.RTF_EDITABLE
FILE_EXTENSION = ".rtf"
Case ReportFormatEnum.TEXT_CHARACTER_SEPARATED, ReportFormatEnum.TEXT_PAGINATED, ReportFormatEnum.TEXT_PLAIN, ReportFormatEnum.TEXT_TAB_SEPARATED, ReportFormatEnum.TEXT_TAB_SEPARATED_TEXT
FILE_EXTENSION = ".txt"
Case ReportFormatEnum.USER_DEFINED
FILE_EXTENSION = ".ud"
Case ReportFormatEnum.WORD
FILE_EXTENSION = ".doc"
End Select
If My.Application.CommandLineArgs.Count > 3 Then
ReDim gstrReportParameters(My.Application.CommandLineArgs.Count - 4)
For c = 0 To gstrReportParameters.GetUpperBound(0)
gstrReportParameters(c) = My.Application.CommandLineArgs(c + 3)
Next
End If
End Sub
Sub Logon()
Dim wSession As BusinessObjects.DSWS.Session.Session
Try
Dim boConnection As BusinessObjects.DSWS.Connection = New BusinessObjects.DSWS.Connection(WS_URL_SESSION)
' login to BusinessObjects Enterprise using web services
Console.WriteLine("Logging into web service...")
Dim credential As New EnterpriseCredential
credential.Login = My.Settings.User_Name
credential.Password = My.Settings.User_Password
credential.Domain = My.Settings.Cluster_Name
credential.AuthType = My.Settings.Authentication_Type
wSession = New BusinessObjects.DSWS.Session.Session(boConnection)
wSession.Login(credential)
Console.WriteLine("Logged into web service.")
boConnection.URL = WS_URL_BIPLATFORM
bipService = New BIPlatform(boConnection, wSession.ConnectionState)
boConnection.URL = WS_URL_REPORTENGINE
boRepEng = New ReportEngine(boConnection, wSession.ConnectionState)
Catch ex As DSWSException
Console.Error.WriteLine(ex)
Console.Error.WriteLine(ex.CauseDetail)
Throw
End Try
End Sub
Private Sub Schedule()
Try
Dim oGetOptions As New GetOptions
oGetOptions.IncludeSecurity = False
Dim crPath As String = "path://InfoObjects/Root Folder/SCH Reports/" + REPORT_STRING + "@SI_SCHEDULEINFO,SI_PROCESSINFO"
Dim rh As ResponseHolder = bipService.Get(crPath, oGetOptions)
Dim oInfoObjects As InfoObjects = rh.InfoObjects
Dim oReport As CrystalReport = oInfoObjects.InfoObject(0)
oReport.Name = REPORT_NAME
Dim oSchedulingInfo As New SchedulingInfo
oReport.SchedulingInfo = oSchedulingInfo
oReport.SchedulingInfo.RightNow = True
'************************************************************************************'
'to schedule a report to pdf format, use the following code
'************************************************************************************'
Dim procInfo As ReportProcessingInfo = oReport.PluginProcessingInterface
Dim repFormat As New CrystalReportFormatOptions
repFormat.Format = REPORT_FORMAT
repFormat.FormatSpecified = True
procInfo.ReportFormatOptions = repFormat
oReport.PluginProcessingInterface = procInfo
'************************************************************************************'
'to schedule to unmanaged disk, use the code below
'************************************************************************************'
Dim oDestination(1) As Destination
oDestination(0) = New Destination
oDestination(0).Name = "CrystalEnterprise.DiskUnmanaged"
Dim diskOptions As New DiskUnmanagedScheduleOptions
Dim destinationFile(1) As String
destinationFile(0) = My.Settings.Export_Location + oReport.Name + FILE_EXTENSION
diskOptions.DestinationFiles = destinationFile
oDestination(0).DestinationScheduleOptions = diskOptions
oSchedulingInfo.Destinations = oDestination
'************************************************************************************'
'to schedule a report with discrete parameter information, use the following code snippet
'************************************************************************************'
Dim repParams() As ReportParameter = procInfo.ReportParameters
Dim oCurrentValues As New CurrentValues
Dim oPromptValue(gstrReportParameters.GetUpperBound(0)) As BusinessObjects.DSWS.BIPlatform.Desktop.PromptValue
Dim c As Integer
For c = 0 To oPromptValue.GetUpperBound(0)
oPromptValue(c) = New BusinessObjects.DSWS.BIPlatform.Desktop.PromptValue
oPromptValue(c).Data = gstrReportParameters(c)
Next
oCurrentValues.CurrentValue = oPromptValue
repParams(0).CurrentValues = oCurrentValues
'************************************************************************************'
bipService.Schedule(oInfoObjects)
Catch ex As DSWSException
Console.Error.WriteLine(ex)
Console.Error.WriteLine(ex.CauseDetail)
Throw
Finally
If Not wSession Is Nothing Then
wSession.Logout()
End If
Console.Write("Done")
End Try
End Sub
End Class
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tom, Elaine,
It took me a couple of months to get that PITA to work. Only caveat is that it was an evaluation version (I was working on it for a client) so I may have download it again if it expired. I'll try it again tonight and keep you guys posted.
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jason,
That would be great news if you did get it to work. After about a week and a half of working with Elaine in Tech Support we were still unable to get this working on the old CR2008 dlls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sorry for the delay.
I did get this working for just plain old vanilla CRS2008. I'm going to load it up again tonight and see if it still works. I'll clean it up and post it if it does. It was pretty hairy but it worked.
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
I've encountered the exact same problem. Did you ever find a solution to this problem?
I'm using the latest Crystal Reports 2008 (SP1) and Server 2008.
Any pointers to a solution is appreciated.
Thanks,
GR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.