Linking variables on PageStyle to Group
Hi,
I'm duplicating a form which has a Header followed by Details which only
print on the left 2/3rds of the page. The other 1/3 contains data which
varies by the Group. The detail section works perfectly. I used a
PageStyle to format the right 1/3rd with variables for the other group
data. How can I force the data to the variables? Or have I approached
this problem wrong.
I'm using D5 with RB 7.04
Thanks,
Marie
I'm duplicating a form which has a Header followed by Details which only
print on the left 2/3rds of the page. The other 1/3 contains data which
varies by the Group. The detail section works perfectly. I used a
PageStyle to format the right 1/3rd with variables for the other group
data. How can I force the data to the variables? Or have I approached
this problem wrong.
I'm using D5 with RB 7.04
Thanks,
Marie
This discussion has been closed.
Comments
I forgot to mention that there are 15 variables at various postions from
the top of the page to the bottom all only in the the vertical space on
the right 1/3 of the page. The detail portion is padded to fit the full
page on the left 2/3rds.
Marie
How are the variables being calculated? Does their value depend on the
detail data? Note that anything inside the PageStyle band will print before
the rest of the report so some values may not be available when the
variables are printed.
One option may be to create and position text draw commands after the proper
calculations have been made. For instance, in the OnEndPage event, you
could say something like the the following...
var
liHeight: Integer;
lDrawText: TppDrawText;
liTop: Integer;
liWidth: Integer;
lBitmap: TBitmap;
begin
lDrawText := TppDrawText.Create(nil);
lDrawText.Page := ppReport1.Engine.Page;
lDrawText.Text := vblLastName.Value;
lDrawText.Font.Size := 12;
lDrawText.Font.Name := 'Arial';
lDrawText.Font.Color := clRed;
lDrawText.Font.Style := [fsBold];
lDrawText.Color := clWhite;
{1000 microns from top of page}
lDrawText.Top := 1000;
{center to middle left to right}
lDrawText.Left := ppReport1.PrinterSetup.PageDef.mmMarginLeft +
(ppReport1.PrinterSetup.PageDef.mmPrintableWidth) div 2;
lBitmap := TBitmap.Create;
lBitmap.Canvas.Font := lDrawText.Font;
liHeight := lBitmap.Canvas.TextHeight(lDrawText.Text);
liHeight := ppToMMThousandths(liHeight, utScreenPixels, pprtVertical,
ppReport1.Printer);
lDrawText.Height := liHeight;
liWidth := lBitmap.Canvas.TextWidth(lDrawText.Text);
liWidth := ppToMMThousandths(liWidth, utScreenPixels, pprtHorizontal,
ppReport1.Printer);
lDrawText.Width := liWidth;
lBitmap.Free;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
All the information for the variables & labels are available at the time
the Group Header is generated and varies when the Group changes. In
fact, if they were part of the Group Header, I would not have a problem.
But to do that, the Group Header would have to be the full page.
I tried 'linking' them into the EndPage, but they don't change correctly
when the Group changes. It works for the first page but not for the
next pages. My Group criteria is a single pipeline field with a New
Page to be generated when the data changes.
One thought I had would be to place the variables in the Group Header
Band but reposition them when they print. Is this possible?
Would it help if I sent you the 'form' as a PDF to see if you have a
better idea.
Thanks,
Marie
One other option to explore would be to create your report with two
side-by-side subreports. There is an example of a report like this located
in the /RBuilder/Demos/1. Reports directory. Take a look at demo 73
(dm0073.pas). If you think it would help me understand what you are trying
to accomplish a little better, please send the PDF file to
support@digital-metaphors.com and I'll take a look at it.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I looked at the #73 demo and I'm not sure if that would work, so I have
just sent you the PDF. Meanwhile, I will try playing with the
side-by-side sub-reports to see if the second one can be a full page
when the first is not. I'm not sure which 'band' to place them in.
Marie
You would want to place the subreports inside the detail band of your
report. I just sent you an example demonstrating this. Let me know if it
helps.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com