1. Trevor Campbell
  2. Report Editor
  3. 金, 10月 06 2017, 12:41 AM
  4.  メールで購読
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.
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