Click here to Skip to main content
13,144,958 members (48,360 online)
Rate this:
Please Sign up or sign in to vote.
I'm having a problem in a Crystal Reports application where I am getting no fields in the Fields property on a DatabaseTable Object. Fields.Count returns zero for every table. This is only happening on one of our user's computers. It's working fine for all the developers in the office. We cannot see anything that is different. I'm also wondering if I am doing something that is fundamentally wrong. The documentation says for the Fields property "One object exists in the collection for every database field accessed by the report" but we are seeing one object for every field that exists in the database for each table, not just the ones that are accessed by the report (which BTW is really what we want). We are using CR runtime version 11.5. Seems to do the same with 11.0. Any ideas would be appreciated. Here is the code we're using (Delphi):

procedure TfrmPCMSCrystalReportViewer.BuildColumnList;
{ Populate slColumns with the list of column.
  For each table in the report, add every column. }
  I, J: Integer;
  Tbl: DatabaseTable;
  with crReport1.Database do begin
    for I := 1 to Tables.Count do begin
      Tbl := Tables[I];
      //process each column in table
      for J := 1 to Tbl.Fields.Count do
        //add column to list
    end; //for
  end; //with
Posted 22-Jun-12 13:26pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 22 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100