I have a question about this… Im working with the download for 6.xx and wondering; We have a universe created that gives us backend information about users, groups, universes, etc. On the report from the download, Im trying to create/add a dataprovider to go after information with this backend universe we have. In the universe weve got an object called “Universe Name” that is created from table/field, universe.M_UNI_C_LONGNAME. On the report, Im linking this object to the Object, Universe Name which on the download is DataRow(5) = DProv.Universe.LongName in the code. (I changed this from 'DataRow(5) = DProv.Universe.ShortName & “-” & DProv.UniverseName).
The data that comes back is identical but its not working. The VBA code is working properly, listing only the universe(s) used in the report(s). But the object from my new dataprovider is giving me all universe names that we have, and Im just expecting the universe name(s) that are on the selected reports. Im wondering .is the VBA code executing before or after the dataprovider is refreshed? Reason why I’m here is that I use this awesome download to list the information about a report but I’m also trying to get more info about the universe…I also want the table and field names of each of the objects on the report…
Code below is the main change, in the Dwayne’s code, to process Manual Querys.
'code included to process Manual SQL Querys.
Else
'Processing Manual Providers
If DProv.GetType = "DPSQLC" Then
DataRow(3) = DProv.Name
DataRow(4) = "SQL"
DataRow(5) = "SQL Manual"
DataRow(6) = DProv.Name
DataRow(7) = ""
For Each Col In DProv.Columns
DataRow(8) = "Field"
DataRow(9) = "Variables"
DataRow(10) = Col.Name
DataRow(11) = ""
Call dpCube.DpVBAColumns.AddLine(DataRow)
Next Col
End If
End If
Well, apparently there is a limit … smile … but not by design. It may help if you could describe exactly what you mean by “I cannot run this macro” … error message, unexpected result, crash, other?
This request doesn’t fit “neatly” into the existing model. The sample VBA code below will pop up a message box for the items you requested. You should be able to adapt the properties it uses to a new tab in the original model.
Sub ListSQL()
Dim DProv As DataProvider
For Each DProv In ThisDocument.DataProviders
MsgBox DProv.SQL
Next DProv
End Sub
Sub ListPrompts()
Dim Var As Variable
For Each Var In ThisDocument.Variables
If Var.IsUserPrompt = True Then
MsgBox Var.Name
End If
Next Var
End Sub
Hi.
Thanks for the report, works fine and very useful.
I have one problem though: for formulas longer than 255 chars i get only the first 255 chars and the rest is omitted. Is there a way to get all the expression?
Thanks
Rafael
It is not possible to find the objects of a universe used in a Crystal report.
Inside the Crystal report you only have an SQL Statement generated from a Universe