How to print a table, how to use DBCrossView wich seams the rigth one for that ?

Hello, I want to print data which are in a FDTable.

I link the table with a frxdataset

I put a DBCrossview with dataset property = frxDataset on a masterdataband not assigned with recordcount=1

FDTable.open

frxReport.PrepareReport(true);

 frxReport.ShowPreparedReport ;

but the report is empty ...

What is the good and easyest solution to print table data with titles ?

regards, Marie

Comments

  • See a sample in the Demos\PrintTable folder

  • thank you very much, my question is resolved :)

    I obtained an error message running the sample in the Demos\PrintTable folder

    but with your comforting I saw more precisely and it's perfect

    if sender is TfrxCrossView then

     begin

       FDTbopen ;

       WFrxCross := TfrxCrossView(sender);

       FDTb.First;

       WIndex := 0;

       while not FDTb.Eof do

       begin

         for WColonne := 0 to FDTb.Fields.Count - 1 do

           WFrxCross.AddValue([WIndex], [FDTb.Fields[WColonne].DisplayLabel], [FDTb.Fields[WColonne].AsString]);

         FDTb.Next;

         Inc(WIndex);

       end;

Leave a Comment