Get page break by code in the OBP event

I have this code in my OBP event of the master data band:
  if [ARTIKELGR] <> [frm_AfdrukkenLijstBestelboek.cldtst_VoorraadLijstBestelboek."ARTIKELGROEPID"] then
  begin
    NewPage;
  end;

  [ARTIKELGR] := [frm_AfdrukkenLijstBestelboek.cldtst_VoorraadLijstBestelboek."ARTIKELGROEPID"];

But it doesn't work.

ARTIKELGR is a variable that I have made within the report and

[frm_AfdrukkenLijstBestelboek.cldtst_VoorraadLijstBestelboek."ARTIKELGROEPID"] is a field of my clientdataset. The type of this field is Integer.


Does anybody have a solution for this problem?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:28AM
    hi
    if [ARTIKELGR] <>
    where are you setting the value in the variable.
    or you may want to reverse left and right sides of boolean equation
    and possibly wrap boolean equation with () or []
    regards ;)
  • edited 8:28AM
    I have a solution:

    In my delphi code before the report is prepared:
      frVariables['ARTIKELGR'] := 0;
    


    In the OBP event of the master data band:
      if (ARTIKELGR <> [frm_AfdrukkenLijstBestelboek.cldtst_VoorraadLijstBestelboek."ARTIKELGROEPID"]) and ([LINE#] <> 1) then
      begin
        NewPage;
      end;
    
      ARTIKELGR := [frm_AfdrukkenLijstBestelboek.cldtst_VoorraadLijstBestelboek."ARTIKELGROEPID"];
    
    

Leave a Comment