Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a CR10-Report from a CE10-Server via VBA

Status
Not open for further replies.

MRR77

Technical User
Sep 26, 2003
10
DE
Hi @all,
(first of all: I hope that I will be able to describe my problem...)

I'm looking for a way to open a report from the CE10-Server. Situation: A user-form in an Access-Database contains a tree-view-control and a list-box.
The logon on the CE10-Server works fine:
Code:
Set es = oSession.Logon(Environ("Username"), "verysecret", "CE10Servername", "secEnterprise")
Filling the tree-view seems to work too using code like:
Code:
objFolders = iStore.Query("Select * from CI_INFOOBJECTS Where " & _
  "SI_PROGID = 'CrystalEnterprise.Folder' AND SI_PARENTID=0")
TV.Nodes.Clear
j = 1
For i = 1 To objFolders.ParentInfoObjects.Count
  TV.Nodes.Add , tvwNext, "a" & CStr(objFolders.ParentInfoObjects(i).ID), objFolders.ParentInfoObjects(i).Title
Next
And getting the names for all reports in one of the clicked entries of that tree-view:
Code:
o = iStore.Query("Select * from CI_INFOOBJECTS " & _
  "Where SI_PARENTID=" & j & " AND SI_PROGID = " & _
  "'CrystalEnterprise.Report'")
If Err.Number = 0 Then
  LstReports.RowSource = ""
  For i = 1 To o.ParentInfoObjects.Count
    If o.ParentInfoObjects(i).ParentID = j Then
      LstReports.AddItem o.ParentInfoObjects(i).ID & ";" & o.ParentInfoObjects(i).Title
     End If
  Next
End If
My problem now is: The user clicks (or double-clicks) one of these report-names - and the program should open the report so that I can read some of the report-properties (formulas, field-names, groups, parameters, SQL-commands etc.)
How can I do this? Do I have to initialize an URIManager-variable? Or an InfoObject? How?
I'm looking now for days and weeks to find a solution...

It would be great if anyone can give me a clue how the problem can be solved.
Looking for your hints and answers
yours Matthias
(from Wiesbaden, Germany)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top