Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
Solved lazreport problem
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: Solved lazreport problem (Read 1940 times)
file015
New member
Posts: 12
Solved lazreport problem
«
on:
August 07, 2010, 01:53:58 pm »
LAZREPORT PROBLEM
Please help me solve this problem , How do I get this::
PAGE 1
Page header
COMPANY....
I get this: 200.00 100.00 100.00
PRIOR TOTAL: 0.00 0.00 0.00
A B C
________________________________________________________________________
Master data
detal 1 100.00 0.00 0.00
detal 2 0.00 50.00 0.00
detal 3 0.00 0.00 20.00
________________________________________________________________________
PAGE FOOTER SUM PAGE 1= TOTAL: 100.00 50.00 20.00
I get this: 100.00 50.00 20.00
PAGE 2
Page header
COMPANY....
I get this: 200.00 100.00 100.00
PRIOR TOTAL= SUM PAGE 1 : 100.00 50.00 20.00
A B C
________________________________________________________________________
Master data
detal 4 100.00 0.00 0.00
detal 5 0.00 50.00 0.00
detal 6 0.00 0.00 80.00
________________________________________________________________________
PAGE FOOTER sumpage1+sum page2=TOTAL 200.00 100.00 100.00
I get this: 100.00 50.00 80.00
WinXp sp3
Lazarus-0.9.28.2-fpc-2.2.4-win32
Lazreport 0.9.5
The Delphi quickrep I do not have that problem
I thank everyone for their help
«
Last Edit: August 12, 2010, 10:22:17 am by file015
»
Logged
jesusr
Sr. Member
Posts: 332
Re: Please help lazreport problem
«
Reply #1 on:
August 07, 2010, 06:59:43 pm »
Please you need to describe or interpret your report better, if it was "I got this report output but it should be this report output", it would be a little more clear.
It's not clear what is in the report and what not, why are the two lines before the master data header different in the two pages. If that data that is not in the report and you put it there only for reference, it only makes it more confusing. Remember that only you know what the figures mean or where they come from.
If you think it's a bug and this is an actual report output, it's better that you prepare a sample project including the report that reproduce the problem and submit a bug report in bug tracker (see the left panel).
Logged
file015
New member
Posts: 12
Re: Please help lazreport problem
«
Reply #2 on:
August 07, 2010, 07:53:38 pm »
Can I send u all in PDF format, better verison laz reprot and original program code, on ur e mail or something similar?
Logged
jesusr
Sr. Member
Posts: 332
Re: Please help lazreport problem
«
Reply #3 on:
August 07, 2010, 08:54:23 pm »
please use the bug tracker, if you don't want to make public your information, make bug report private, if you have problems with bug tracker, click my user name it should show you my email address.
Logged
file015
New member
Posts: 12
Re: Please help lazreport problem
«
Reply #4 on:
August 08, 2010, 12:15:08 am »
I think it's a little clearer now which I want to get
Please help me solve this problem , How do I get : " I WANT THIS "
PAGE 1
Page header
COMPANY....
I get this: 320.00 is NOT OK
INITIAL STATE TOTAL: 0.00 is OK I WANT THIS
A
_____________________________________________________
Master data
detal 1 100.00
detal 2 50.00
detal 3 50.00
__________________________________________________________
PAGE FOOTER
SUM PAGE 1= TOTAL: 200.00 is OK I WANT THIS
I get this: 200.00 is OK
PAGE 2
Page header
COMPANY....
I get this: 320.00 IS NOT OK
INITIAL STATE SUM PAGE 1 : 200.00 is OK I WANT THIS
A
__________________________________________________________
Master data
detal 4 100.00
detal 5 10.00
detal 6 10.00
__________________________________________________________
PAGE FOOTER
sumpage1+sum page2=TOTAL 320.00 is ok I WANT THIS
I get this: 120.00 is not OK
WinXp sp3
Lazarus-0.9.28.2-fpc-2.2.4-win32
Lazreport 0.9.5
The problem is solved:
procedure TForm1.QrKepuBeginDoc;
begin
suma1_var:=0;
sumai2_var:=0;
suma3_var:=0;
end;
procedure TForm1.frReport1GetValue(const ParName: String; var ParValue: Variant);
var suma1_var,suma2_var,suma3_var:double;
begin
if parname='flag' then // 'flag' the master detail band
begin;
Suma1_var :=suma1_var+MainTbl.FieldByName('A').asFloat;
Suma2_var:=suma2_var+MainTbl.FieldByName('B').asFloat;
Suma3_var:=suma3_var+MainTbl.FieldByName('C').asFloat;
parvalue:=' ';
end;
// in page header and page footer memo1 , memo2 , memo3 .
if parname = 'test1' then parvalue :=FloatToStr(suma1_var);
if parname = 'test2' then parvalue :=FloatToStr(suma2_var);
if parname = 'test3' then parvalue :=FloatToStr(suma3_var);
end;
Jesus, thank you very much for the idea .
«
Last Edit: August 11, 2010, 04:20:17 pm by file015
»
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
Solved lazreport problem
Recent
TDBEdit can't keep its va...
by
dr4cul453xy
[
Today
at 09:10:32 am]
[SOLVED] Stream newb - si...
by
BigChimp
[
Today
at 08:41:43 am]
LDAP, objectsid is there ...
by
BigChimp
[
Today
at 08:41:17 am]
Get list of drives
by
ludob
[
Today
at 08:26:26 am]
FPC 2.6.0 released!
by
MikeFinch
[
Today
at 01:00:43 am]
Custom Draw Controls miss...
by
lainz
[February 10, 2012, 11:30:47 pm]
TTogglebox color
by
Switcher
[February 10, 2012, 11:00:39 pm]
SSH DLL (w-putty-cd) coul...
by
ludob
[February 10, 2012, 05:48:02 pm]
TCDButtom select dsAndroi...
by
wcleyton
[February 10, 2012, 05:47:36 pm]
POCKET PC 2002 ERROR WITH...
by
delphiturk
[February 10, 2012, 03:20:20 pm]