Recent

Author Topic: LazReport - using GroupHeader with frUserDataSet  (Read 4338 times)

HGabor

  • New Member
  • *
  • Posts: 17
LazReport - using GroupHeader with frUserDataSet
« on: May 02, 2012, 11:47:07 pm »
Hello,

I am printing a spreadsheet with LazReport, using frUserDataset and the OnGetValue event.
Everything is working fine, except that I needed some page breaks after a couple of lines, several times.

My idea was to put a GroupHeader with pagebreak checked and give a value for it, what I can change when I want in OnGetValue.
The problem is that I cannot set the condition of the GroupHeader. I thought to add a variable that I can set in OnGetValue. I put a Memo on the  GroupHeader band with [mygroup] inside, define in OnGetValue the following:

if UpperCase(ParName) = 'MYGROUP' then ParValue := 1;

but I get an error message "Undefined Symbol mygroup".

It seems to me that ParValue gets the value 1.

So my questions are:

Is it possible to feed groups from OnGetValue, without using an frDataSet? If so, how?

Is there any other possibility to force a page break in Lazreport? I mean calling from a script or something like this.


Thanks for any help in advance.