cancel
Showing results for 
Search instead for 
Did you mean: 

List reports in Universe using .Net?

Former Member
0 Kudos

Hi Dell

Thanks for resloving my query

Also I need to list the all the reports built on Universes.


I have queried out the List of universes but not able to find the dependent reports.

i am using below namespaces for this:

using CrystalDecisions.Enterprise;

using CrystalDecisions.Enterprise.Desktop;

This is not allowing me to list the reports.

Am i using the correct namespace? or i need to add new assemblies. Where i can find those?

Regards

Vipin

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Crystal reports or Webi?

For Webi reports, this is not difficult.  The Universe class has a "Webis" property that contains the SI_ID value of all of the Webi reports that connect to that universe.  From the SI_ID value you can get the name of each report.

For Crystal reports its a bit more difficult.  You have to get each Crystal report, get the "SI_UNIVERSE" (for .unv universes) or "SI_DSL_UNIVERSE" (for .unx universes) property to get the SI_ID of the universe(s) that the report uses.  Here's some sample of the C# code that I use for this:

    private void loadRptUniverses(InfoObject obj)
    {
      int unvId;
      try
      {
        CrystalDecisions.Enterprise.Properties props = obj.Properties;
        foreach (Property prop in props)
        {
          if ((prop.Name == "SI_UNIVERSE") || (prop.Name == "SI_DSL_UNIVERSE"))
          {
            foreach (Property univ in prop.Properties)
            {
              try
              {
                unvId = Convert.ToInt32(univ.Value);
              }
              catch
              {
                unvId = 0;
              }

              if (unvId > 0)
              {
                //Do whatever is needed to get the universe info that you want.
              }
            }
          }
        }
      }
      catch
      {
        //don't do anything - we're not going to worry about it
      }
    }

-Dell

Former Member
0 Kudos

Hi Dell

I am not able to access the Universe class.

In which namespace i can find this .

Regards

Vipin

DellSC
Active Contributor
0 Kudos

BusinessObjects.Enterprise.Desktop.Universe

-Dell

Former Member
0 Kudos

Hi Dell

I am not able to add refence for this name space.

My machine is not showing the BusinessObjects enterprise Dll's.

I can see the Business objects dll's in c>Windows>assembly but when i added reference in web config  and try to using namespace getting error:

The type or namespace name 'BusinessObjects' could not be found (are you missing a using directive or an assembly reference?)

2008

I am using BOXIR3.1 and visual studio 2008.

Please do help.

Regards

Vipin

DellSC
Active Contributor
0 Kudos

I'm not quite sure what to do about that - I mostly write WinForms and Console apps.  Are you sure you've spelled it correctly?  Just to be sure, I've copied and pasted this from the app where I use this code:

BusinessObjects.Enterprise.Desktop.Universe

-Dell

former_member183750
Active Contributor
0 Kudos

Hi Vipin

Please see this Discussion:

Look for the post Dan Paulsen made on

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter