Recent

Author Topic: I am new in reports  (Read 439 times)

Borneq

  • Full Member
  • ***
  • Posts: 248
I am new in reports
« on: May 03, 2022, 09:15:57 pm »
I see https://wiki.freepascal.org/LazReport_Tutorial and have some questions:
I use Firebird database with customers, contracts, invoices, etc..
I open designer.
1.If I click on design mode on frReport1,I have on left Cross-tab object and barcode, but if in runtime I call frReport1.ShowReport - I haven't
2.If I insert cross-tab object - in preview is none visible
3.Is good Tool->Tools-> insert db fields
It insert one number, string,date etc from current row of table
which is the current row?
4. How can I change current row?
5. Is possible report from many rows, for example multi-page table of filtered customers?
6. I can add band Title, but is invisible, I can't set title text .


dseligo

  • Hero Member
  • *****
  • Posts: 715
Re: I am new in reports
« Reply #1 on: May 08, 2022, 01:02:45 am »
1.If I click on design mode on frReport1,I have on left Cross-tab object and barcode, but if in runtime I call frReport1.ShowReport - I haven't
2.If I insert cross-tab object - in preview is none visible

Do you mean that barcode's aren't showing only in combination with cross-tab report or in generally?
To use barcode object you also need to put TfrBarCodeObject from components to your form (where you frReport1 is).
I've never used cross-tab reportm, but I see that there is also TlrCrossObject in components - maybe you should put that on your form to use cross-tab report.

Quote
3.Is good Tool->Tools-> insert db fields

Tool is OK, but your query has to be active during design. I set DB field names manually in most cases.

Quote
It insert one number, string,date etc from current row of table
which is the current row?
4. How can I change current row?

It depends in what band you put memo object with your DB field.
If you put that in Report title band, then it will show current row.
But if you it in Master data band it will show all rows from your query (this is by default).
You don't have to change current row, report does that for you.
Beside DBDataSet, you have also user dataset, virtual dataset, OnGetValue event, you can set variables from your programs, you can change report's objects properties from your program - it depends what you need.

Quote
5. Is possible report from many rows, for example multi-page table of filtered customers?

Yes.

Quote
6. I can add band Title, but is invisible, I can't set title text .

Put Memo object on band Title and then write text you want to show in the memo.

 

TinyPortal © 2005-2018