Print Page | Close Window

Get the DataBase Field Explorer

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4520
Printed Date: 05 May 2025 at 3:42am


Topic: Get the DataBase Field Explorer
Posted By: signus
Subject: Get the DataBase Field Explorer
Date Posted: 13 Oct 2008 at 10:26am
Hi every one!
 
How i could put in a grid or in a listbox the whole datafield explorer on a report?
 
I mean, maybe i want to put special filters on the record selection formula on a predefined report, but i want that the user knows the fields involved in the dataset of the report to create the formula. 
 
How i could do that?
 
Thanx in advance.
 
Signus


-------------
..::Writing a better world::..



Replies:
Posted By: hilfy
Date Posted: 13 Oct 2008 at 11:53am

So you want to list all of the tables and fields that are used to generate a report?  AFAIK, you would have to manually type it into a text box on the report.

-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: signus
Date Posted: 13 Oct 2008 at 2:00pm
I solved my problem with this....
 
 
Dim cr As New ReportDocument

cr.Load(Application.StartupPath & "\report.rpt")

Dim iTabla, iCampo As Integer

Dim sTabla, sCampo, item As String

For iTabla = 0 To cr.Database.Tables.Count - 1

sTabla = cr.Database.Tables(0).Name.ToString

For iCampo = 0 To cr.Database.Tables(iTabla).Fields.Count - 1

sCampo = cr.Database.Tables(0).Fields.Item(iCampo).Name.ToString

item = "{" & sTabla & "." & sCampo & "}"

'TextBox1.Text = cr.Database.Tables(0).Fields.Item(0).Name

ListBox1.Items.Add(item)

Next

Next



-------------
..::Writing a better world::..



Print Page | Close Window