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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.