1. gary
  2. Report Editor
  3. Wednesday, October 10 2018, 08:27 AM
  4.  Subscribe via email
Hi,
How to make some footer fields shown only in last page?

I have tried put something in "print_if":
- $(Page)==$(PageTotal)
- Page==PageTotal

But still no luck. Any idea?

PS: Please open the attachment


regards,
Gary
Attachments (1)
Comment
There are no comments made yet.
gary Accepted Answer
Ruslan,it is as simple as setting conditional field, just like valentina "print_if". Some of course using simple scripting like on_print event.

Actually valentina "print_if" works for db field, that mean i can hide it when the field value is 0. But unfortunately it wont work with macro variable such as "print_if ($page==$pageTotal)", it raise error.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 1
Ruslan Zasukhin Accepted Answer
"" Ruslan,my task is very easy to achieve in crystal report and other reporting tools.


Can you describe how exactly they solve this task?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 2
gary Accepted Answer
And what i mean "unstable scripting variable":

When reach each event such as "pre_place", "pre_print" ... and etc. Some report object variable must be consistent, such as current page, total page, current records and etc. But this is not true in valentina. You should tell your users a very clear life cycle of your scripting engine, just like how google did for android app life cycle documentation.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 3
gary Accepted Answer
Ruslan,my task is very easy to achieve in crystal report and other reporting tools. Each fields got conditional visual setting. Actually "print_if" for each fields should solve my task very easily, but the weird thing is it only can work with database field, but not macro variable. That is why I feel valentina is not that intuitive, it is cool but so so so different from other famous report tools.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 4
Sergey Pashkov Accepted Answer
Currently there is no property for the region height. But you can add a new control (label, rectangle), set its height and use it to measure and resize the regions.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 5
Ruslan Zasukhin Accepted Answer
Hi Gary,

That was NOT unstable scripting variables.

It hard to explain, your task is really the first time we see in 5 years. We did spend a couple hours thinking how to solve it, and watching other products learning how this can be solved there. Then we have chosen the solution you see.

In your case, hide/show did depend on the last page. Also, notice that show/hide can give empty space which a report maybe must remove... etc.
In the general case exists many variants.

Anyway, you are welcome to test something and if you see something is missing - let us know. We usually have 1-2 weeks hotfix builds.


=========== Mantis Info =====================
You are welcome to report issue(s) and feature requests
into Mantis - our bug tracker.
<http://valentina-db.com/bt/>;

Why is it better? Described in these FAQs:
<http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:faqs:vbugs>;

TIPs:
* Please report each issue as a separate report.
* If you have database or project then attach it compressed to the report.
you can put up to 250Kb archives.
* Provide in the report as many detailed info as you can: OS, version, locale, ….
* If possible, please provide exact steps how to reproduce problem.
=========================================
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 6
gary Accepted Answer
I just download 8.6.2,the last page footer solve my case, but it would be better if you can solve the unstable scripting variables problem. Because in future, I might need to have requirement from client: In certain page number, the footer or header need to show / hide some fields. So the last page footer still cant solve that kind of requirement. I demand a flexible system.

Another question is, how do I check the height of footer? Because now page footer and last page footer are different section, so without letting me to key in height manually, with just the ruler system, I cant align them both well.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 7
Ruslan Zasukhin Accepted Answer
8.6.2 uploaded here:
http://valentina-db.com/download/prev_releases/

You can try it

we will also do some testing then push to release area if all right.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 8
Ruslan Zasukhin Accepted Answer
Headup: we starting build processes for 8.6.2

usually 2-4 hrs to upload
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 9
gary Accepted Answer
Thanks for fast response. How do I get the 8.6.2? I am using 8.6.1 now.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 10
Ruslan Zasukhin Accepted Answer
Update2:

we going to add one more region: Last Page Footer
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 11
Ruslan Zasukhin Accepted Answer
Update:

our main developer of report engine now plugged ...
So far we thinking how to resolve this task asap in any possible way to get it working in 8.6.2 (today or tomorrow).
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 12
gary Accepted Answer
Sorry,I did not notice our discussion already went to next page.

It would be better if you document the life cycle of the script inside the report.
So far I am stuck because my client needs this feature. Please fix as soon as possible. I am now using version 8.6.1 64 bit

thanks.


regards,
Gary
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 13
Sergey Pashkov Accepted Answer
As I said page footer is generated before any record, so the value 1 is predictable when there is only one page.

report.log method outputs values into the console, so it is possible to check them during generation. Report cursor is a very internal thing, so it may be hard to rely on it’s position.

But unfortunately in the current build I can’t find good solution for this task. We’ll work today on it to make changes to the engine, I think pageCount should be changed.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 14
gary Accepted Answer
I found that the scripting engine is broken. The report.cursor.position is not stable inside pre_place event. This is the reason why sometime works sometime does not.

I am using the latest valentina studio 8.61 64 bit.

Any idea? I am stuck here, please solve it as soon as possible. thanks.


regards,
Martin
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 15
gary Accepted Answer
Script system has bug, please read the attachment.

In that situation, only 4 records in 1 page. So I add a simple script line in pre_place:
report.controls.labelApprovedBy.label = report.cursor.position;


When execute this script line, the log said "4", which is correct. But when the report previewed, it shows "1", that is why the footer solution not working sometimes. report.cursors.position value is unstable and unpredictable.

Please give me the fix as soon as possible. Thanks.


regards,
Gary
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 16
Sergey Pashkov Accepted Answer
So the problem is not only when there is only one page?

With one page it is clear - the footer is generated before any records are printed, so the cursor at zero position.

It is not possible to make it solid without changes to the engine which we'll of course make.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 17
gary Accepted Answer
Frankly the scripting system is broken. It is not stable at all.

Sometime it works some it doesn't work, I suspend it depend on how many row of data fetched, which is very very very weird and should not be happened in professional reporting tool.

I am disappointed. Will think to request refund of VStudio license.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 18
gary Accepted Answer
Come on, please give me stable and solid solution. I cant waste too much time on this :(
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 19
gary Accepted Answer
I found that when only 1 page, your way fail. Any idea?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 20
  • Page :
  • 1
  • 2


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. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories