Global variable in script bug?

edited 8:28PM in FastReport 4.0
I have defined var sex1 in the top of Script.
- created 2 pages with 2 masterdata with same datasource.
- duplex, A3 format

I set sex1 with number 1 or 2 in MasterData1OnBeforePrint.

I would like to use sex1 in MasterData2OnBeforePrint, but it is 70 and incremented at next pages !!!


Comments

  • gpigpi
    edited 8:28PM
    Attach small test project with problem
  • edited April 2011
    see attachment fr3 source and sorry it is not 70++, but always number 1.
    At Page1 is sex1 and sex2 number 1 or 2.
  • gpigpi
    edited 8:28PM
    Can you attach data for report's preparing (in dbf, xls or MS Access mdb format)?
  • edited 8:28PM
    mdb in attachment.

    I want 2x duplex A4 printed on duplex A3.
    I would like just to print 2xA4 to 1xA3 and then cutting A3. Difficult script is only for backside of A3, because fast report dont swap half parts of backside in duplex mode. Every half parts are different.
  • gpigpi
    edited 8:28PM
    But for your report template you will always get 'sex1' and 'sex2' values for last record
    Create report without sorting of records (use A4 page) and then resort preview pages:
    http://www.fast-report.com/en/forum/?p=/discussion/7849
  • edited April 2011
    1.
    it means that it is not possible to do it normal way?
    other solution is not possible, because it means logic is in application. it is not possible, because reports are A4 or A3 and many dyn. loading. I dont want to give to user to choice via radiobuttons to print A4 or A3. In final it is impossible.
    It must be in report script. And in finally I dont know how to put A4 to A3(2 columns).

    2.
    and what about global variables?
    they are always 1 at backside of duplex page.

    3.
    I thing that when i create duplex report with 2 columns, it must automatically swapping columns at backside, but FR dont do it !!!! Do you understand what I am talking about? It is main problem why I am looking other crazy way.

    thx
  • gpigpi
    edited 8:28PM
    1. Yes. See a sample based on FRDemo in attach
    2. I get always 2 on your data, because last record for your dataset set value to 2

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.