Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Get the DataBase Field Explorer Post Reply Post New Topic
Author Message
signus
Newbie
Newbie
Avatar

Joined: 13 Oct 2008
Location: Mexico
Online Status: Offline
Posts: 2
Quote signus Replybullet Topic: Get the DataBase Field Explorer
    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::..
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
signus
Newbie
Newbie
Avatar

Joined: 13 Oct 2008
Location: Mexico
Online Status: Offline
Posts: 2
Quote signus Replybullet 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::..
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.