Recent

Author Topic: [SOLVED]Make with Lazreport the same report like Biolife demo from Fortresreport  (Read 15946 times)

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
Hi everybody, Lazarus lovers :)
I need to make report for my SATO CX400 printer to print barcodes from mssql database in two columns..
After I finished my aplication in Lazarus i made report with Lazreport to use clientdataset from Lazreport module and my barcode is code39.It works perfectlly except i need to make one barcode for every column separately for each item but don't know how to do that!?
After i searched internet and forum found demo aplication named biolife from fortres4lazarus which is exatly what I need..array of reports in more line..in my case in two lines..
Does somebody know is it possible with Lazreport to do..!? :'( Margins works but how to multiply
my report to have more (grouped) items!?
Any answer is help :)
« Last Edit: May 19, 2011, 07:06:47 pm by nicke85 »
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Hi,
probably it's possible with : insert band->subdetail(header and data)
frDataSet have an event: onNext ... :(

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
exdatis thanx for reply..I have checked onNext event and don't know what to do..
I'll try to make EOF := false and to post onnext event :)
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
OnNext -> run subdetail query or set some memo_text explicitly.

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
I dont know what to set onnext event!?!? If try to use memo from Lazreport and subdetail or detail band there is no way to see variables in my report.
I have my array of variables to use in report,it is generated from my code arrays :P..

company_name - from Edit1.text -----this is static
id_os - number of subject
name_os -name of subject
loc_id --location id
barcode --generated from id_os number

Every variable except company_name must be cross printed for each item..
Code from frreport eof is

Code: [Select]
if Listbox1.Items.Count > 0 then Eof := False else Eof := True;
« Last Edit: May 18, 2011, 08:14:40 pm by nicke85 »
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
OK i have tried everything and can't do that..please somebody who knows to download fortres report and see how to implement biolife demo in lazreport..it will bee help for everybody on this forum :(

exdatis do you maybe know how to use custom client data eg. from edit1.text in RLDetailGrid1 in fortresreport!?
i must finish my project as soon as posible..
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Use:
   frSomeReport.FindObject('Memo11').Memo.Text:= some_var;//some_var as String

It is easy to set any custom var.
{also onNext...}
frSomeReport.FindObject('Memo11').Memo.Text:= some_var_two;
« Last Edit: May 19, 2011, 07:14:22 am by exdatis »

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
OK deside to make it with LazReport :P

I have one ListBox with array of strings and want to parse it to get values for report..
if use static variable it work for one page in LazReport eg var1 := Edit1.Text etc...

but my report must to look like this one:

[bk1]  [bk2]
[bk3]  [bk4]
[bk5]  [bk6]
[bk7]  [bk8]
etc... until no more items

every row is another barcode generated from ListBox stringlist (parsed number) and a few information from string list to..
How to make it to get more values in report!?

Thanx exdatis for code i will try to learn fortes too :)

« Last Edit: May 19, 2011, 01:26:18 pm by nicke85 »
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
Here what i do for testing

made global variable for counter BROJAC_PROBA : integer;
and another for pointer in ListBox1 as PROBA : string;

Code: [Select]
procedure TForm2.frUserDataset1CheckEOF(Sender: TObject; var Eof: Boolean);
begin
  while (ListBox2.Count-1) <> BROJAC_OS do
   Eof:=False; 
end;

procedure TForm2.frUserDataset1First(Sender: TObject);
begin
  BROJAC_PROBA:=0;
end;

procedure TForm2.frUserDataset1Next(Sender: TObject);
begin
  inc(BROJAC_PROBA);
end;      
---
Code: [Select]
procedure TForm2.frReport1GetValue(const ParName: String; var ParValue: Variant
  );
begin

  PROBA := ListBox2.Items[BROJAC_PROBA];

  if parname = 'var1' then
    parvalue := PROBA;

end;    

In Object inspectop of LazReport i set on main page to be splited into two collums and oreder items by rows but only one item from Listbox is diplayed :(
any response :)
« Last Edit: May 19, 2011, 02:06:00 pm by nicke85 »
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
In LazReport must be used MasterData band for fruserdataset..like for database..and it works :)
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
oh by the way, next time don't post issues or questions in the forum:
Announcements > Third party...
This forum is restricted to releases of Third party components or applications made with Lazarus. ;)
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
ok my mistake :P
here is tutor for fortes which i made after finished project with lazreport..
http://www.lazarus.freepascal.org/index.php/topic,13286.0.html
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

 

TinyPortal © 2005-2018