Click here to Skip to main content
11,930,449 members (55,018 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 14: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 | Mobile
Web03 | 2.8.151126.1 | Last Updated 22 Jun 2012
Copyright © CodeProject, 1999-2015
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