cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduling Deski rep with prompts issue

Former Member
0 Kudos

Hi, I'm trying to schedule Desktop Intelligence report with VB.NET. Although scheduling works fine I am not able to see resultset .

if i click referesh data then it is working fine

But Webi report I am able to schedule sucessfully and data is getting refereshed automatically.

Deski report is not getting refereshed.

Following is the code for webi report

__________________________________________________

sQuery = "Select * From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Webi' AND SI_Name='" & ReportName & "' AND SI_ID=" & CInt(Rid) & " AND SI_INSTANCE=0"

myWebiObjs = boInfoStore.Query(sQuery)

myWebiObj = myWebiObjs.Item(1)

WebiPlugin = New BusinessObjects.Enterprise.Desktop.Webi(myWebiObj.PluginInterface)

Dim webi_ps1 As BusinessObjects.Enterprise.Desktop.WebiPrompts

Dim webi_p1 As BusinessObjects.Enterprise.Desktop.WebiPrompt

Dim p As Boolean

p = WebiPlugin.HasPrompts

If p = True Then

Dim iMinuteNumber

iMinuteNumber = 1

Dim iLogonNumber

iLogonNumber = -1

Dim strToken As String

strToken = boEnterpriseSession.LogonTokenMgr.CreateWCAToken("", iMinuteNumber, iLogonNumber)

' Create the report engine object

Dim webiReportEngines As ReportEngines

webiReportEngines = New ReportEngines(strToken)

Dim webiReportEngine As IReportEngine

Dim webiDoc As IDocumentInstance

webiReportEngine = webiReportEngines.getService(ReportEngineType.WI_ReportEngine)

' Open the webi report using the report engine

webiDoc = webiReportEngine.OpenDocument(myWebiObj.ID)

webiDoc.Refresh()

' Create the SI_WEBI_PROMPTS property bag

ReportParameterUtility.PopulateWebiPrompts(webiDoc.GetPrompts(), WebiPlugin)

' Get the prompts object

webi_ps1 = WebiPlugin.Prompts

For promptcount As Integer = 1 To webi_ps1.Count

webi_p1 = WebiPlugin.Prompts.Item(promptcount)

webi_p1.Values.Clear()

webi_p1.Values.Add(PromptValue(promptcount - 1))

Next

'Schedule to pdf

WebiPlugin.WebiFormatOptions.Format = BusinessObjects.Enterprise.Desktop.CeWebiFormat.ceWebiFormatWebi

'Set up scheduling information

webiSchedulingInfo = WebiPlugin.SchedulingInfo

webiSchedulingInfo.RightNow = True

webiSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce

'schedule(report)

boInfoStore.Schedule(myWebiObjs)

End If

Following is the code for Deski report

_____________________________________________

sQuery = "Select * From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.FullClient' AND SI_Name='" & ReportName & "' AND SI_ID=" & CInt(Rid) & " AND SI_INSTANCE=0"

myDeskiObjs = boInfoStore.Query(sQuery)

'Turn the infoobject into a webi document object

myDeskiObj = myDeskiObjs.Item(1)

DeskiPlugin = New BusinessObjects.Enterprise.Desktop.FullClient(myDeskiObj.PluginInterface)

DeskiPlugin.RefreshOnOpen = False

'Set up prompting

Dim Deski_ps As BusinessObjects.Enterprise.Desktop.FullClientPrompts

Dim Deski_p As BusinessObjects.Enterprise.Desktop.FullClientPrompt

'Check that there are indeed prompts to fill

Dim p As Boolean

p = DeskiPlugin.HasPrompts

'Set the prompt

If p = True Then

'Get the webi prompt object from the webi report engine so that we can update the prompts.

'Create a token to use to create the report engine

Dim iMinuteNumber

iMinuteNumber = 1

Dim iLogonNumber

iLogonNumber = -1

Dim strToken As String

strToken = boEnterpriseSession.LogonTokenMgr.CreateWCAToken("", iMinuteNumber, iLogonNumber)

' Create the report engine object

Dim DeskiReportEngines As ReportEngines

DeskiReportEngines = New ReportEngines(strToken)

Dim DeskiReportEngine As IReportEngine

Dim DeskiDoc As IDocumentInstance

DeskiReportEngine = DeskiReportEngines.getService(ReportEngineType.FC_ReportEngine)

'Open the webi report using the report engine

DeskiDoc = DeskiReportEngine.OpenDocument(myDeskiObj.ID)

DeskiDoc.Refresh()

Deski_ps = DeskiPlugin.FullClientPrompts

For promptcount As Integer = 1 To Deski_ps.Count

Deski_p = DeskiPlugin.FullClientPrompts.Item(promptcount)

Deski_p.Values.Clear()

Deski_p.Values.Add(PromptValue(promptcount - 1))

Next

DeskiPlugin.FullClientFormatOptions.Format = BusinessObjects.Enterprise.Desktop.CeFullClientFormat.ceFullClientFormatFullClient

DeskiSchedulingInfo = DeskiPlugin.SchedulingInfo

DeskiSchedulingInfo.RightNow = True

DeskiSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce

boInfoStore.Schedule(myDeskiObjs)

End If

For Webi report I am using one command "populatewebiprompts" to populate webi prompts.

the same way I need to find the way for populatedeskiprompts.I am not able find out.

if any one knows please help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

hi,

this is a very old post but I'm desprately tring to find where "BusinessObjects.Enterprise.Desktop.Webi" class. I cant see it in the 4.1 sp4 .net sdk install. can you please tell me where should I find it.

thanks in advance.

former_member183750
Active Contributor
0 Kudos

This was deprecated a long, long time ago. Like in BI Platform 4.0

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

0 Kudos

Thank you Ludek,

How can I change prompts of a webi report in BO 4.1 sp4 using .net sdk. I see it can be done with java but I need to do it with .net.

Thanks in advance.

DellSC
Active Contributor
0 Kudos

You'll need to use the RESTful Web Services SDK that was introduced in 4.0.  The cool thing about this SDK is that you don't need to install anything on the developer workstation or where your application is deployed to use it.  The RESTful Web Services run in the Web Application Container Server in BO.  To use the SDK you create HTTP Gets and Puts; the web service will then return its response in either XML or JSON format.  For more information about this, see .

-Dell

0 Kudos

Thank you Dell Stinnett-Christy. Since our application was built on .net sdk. we didnt wanted to change it. But there isn't any better option so we went for the restful sdk and found that it is much faster that .net sdk.

Former Member
0 Kudos

I don't see where there's any answer to this. I'm having a similar problem where the WebI report is not working. I get the error message: Could not load type 'BusinessObjects.ThirdParty.OMG.CORBA.OBJECT_NOT_EXIST' from assembly 'BusinessObjects.Enterprise.Sdk, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'. I also don't understand why when I query for SI_KIND = 'Webi' or SI_PROGID = 'CrystalEnterprise.Webi' or even SI_TYPE = 261 I get Crystal Reports objects. I thought that might be why my call to BusinessObjects.ReportEngine.IReportEngine.OpenDocument(Report.ID) fails, but even when I call that on a Webi document object, I still get that same OBJECT_NOT_EXIST error. Any ideas on this? It's driving me crazy!

Former Member
0 Kudos

Hi,

I have the same issue. Do you find a solution?

Thanks in advance