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 1:43PM
    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 1:43PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.