How can I extract a list of the fields from a Crystal Report so the appear say in a list box so that a user could select only the ones he\she wishes to see in there custom report. thanks :)
Printable View
How can I extract a list of the fields from a Crystal Report so the appear say in a list box so that a user could select only the ones he\she wishes to see in there custom report. thanks :)
This could be very complicated, Do you simply want to
filter your recordset or do you want to SUPRESS fields
through VB code? Both are probably possible.
If you want a a list of Database fields then just
query the database.
If you want formula or parameter fields check this out....
VB Code:
Dim App1 As New CRAXDRT.Application Dim Report As New CRAXDRT.Report Set Report = App1.OpenReport(p_ReportPath & p_ReportFileName) Report.FormulaFields.Item(1).Name Report.ParameterFields.Item(1).Name
Since they are stored in collections you can
loop through the collection to get all of the names.
BombDrop - Please respond in further detail. This
question really has me thinking and I would love
to see if it works. I have an idea but I want to make
sure we are on the right track before I put any more
time into it. Let me know.