1. Trevor Campbell
  2. Report Editor
  3. Пятница, Октябрь 06 2017, 12:41 AM
  4.  Подписаться через email
I am trying to use values such as $(record) or $(page) in the print_if property. Can't get it to work.

I have tried the following
$(record) < $(recordtotal)

Am I doing this wrong?

Does anyone have any suggestions?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Trevor,

The print_if property accepts:
- The field name from the source cursor
- SQL expression

So currently it is impossible to use macros here.

But with JavaScript, I was able to hide a field in the last record.

To do it I added the following Report Body pre_place script:

report.controls.field_to_hide.print = report.cursor.position < report.cursor.recordCount ? 1 : 0;
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
Thanks for the reply. I am trying to stop a page break if it is the last record. Will this code work for a page break?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Yes, it works.

And the page break is inside of the page body, right?
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
It's in a grouped footer.
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
I couldn't get the above to work.

I have included a screen shot to make things a bit clearer. I am wanting the pagebreak to not create another page at the end of the report.

Thanks
Вложения
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
There's the property new_page in the group header, but it will make a page break after the Report Header and Page Footer, so can't be used here.

I've placed the following code in the group footer pre_place script and it worked:
report.controls.break1.print = report.cursor.position < report.cursor.recordCount ? 1 : 0;
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
Works perfect.:D

Thanks
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
It works great in the report designer but when I use it in the app it doesn't work.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hi Trevor,

It's strange.

It is used in Xojo, right? Does the version of the plugin match the version of the Valentina Studio?
Are there any parameters in this report?
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
I'm using the latest version of valentina studio. I will check the plugin. I haven't updated the plugin for a while. Where do I get the latest version of the plugin.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Комментарий
There are no comments made yet.
Trevor Campbell Ответ принят
Updated plugins and it seems to work now.:D

Thanks
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories