Page number and line number in data source
Page number and line number in data source
Hello.
I am a bit confuse, becouse i thought it will not have problems with it, but i do.
I want to do two things.
First:
I want have page number on page when number of page is greater than 1. I tried using system variables, but all failed. I used conditions like "TotalPageCount == 1", "TotalPageCount > 1", "IsFirstPage == IsLastPage", "IsFirstPage == true && IsLastPage == true" - when i was displaying values of this variables, they were correct, but conditions didn't work. I add attachment to show it. Maybe i am doing something wrong - on 90% i am doing something wrong, becouse it should work, but i am not sure what unfortunately.
Second:
I have three data source with the same business obcjet and they display similar field, but in different place of report and the data i want to display in each data source is different. I have field name "Type" (it is int) and when the value of this field is 0 i want to display it in first data source, if the value is 1 i want to display it in second data source, etc. I tried using filter, but it didn't work, becouse all data sources take the last added filter, not their own filter. So i used conditions on all fields and it work as i wanted (but still don't know why filters didn't work). And now i also want to display line in each data source starting from 1. I was trying using system variables Line and LineThrough and GroupLine, but it never work fine.
Do you have any idea how to fix this two problems?
Thank you in advance.
I am a bit confuse, becouse i thought it will not have problems with it, but i do.
I want to do two things.
First:
I want have page number on page when number of page is greater than 1. I tried using system variables, but all failed. I used conditions like "TotalPageCount == 1", "TotalPageCount > 1", "IsFirstPage == IsLastPage", "IsFirstPage == true && IsLastPage == true" - when i was displaying values of this variables, they were correct, but conditions didn't work. I add attachment to show it. Maybe i am doing something wrong - on 90% i am doing something wrong, becouse it should work, but i am not sure what unfortunately.
Second:
I have three data source with the same business obcjet and they display similar field, but in different place of report and the data i want to display in each data source is different. I have field name "Type" (it is int) and when the value of this field is 0 i want to display it in first data source, if the value is 1 i want to display it in second data source, etc. I tried using filter, but it didn't work, becouse all data sources take the last added filter, not their own filter. So i used conditions on all fields and it work as i wanted (but still don't know why filters didn't work). And now i also want to display line in each data source starting from 1. I was trying using system variables Line and LineThrough and GroupLine, but it never work fine.
Do you have any idea how to fix this two problems?
Thank you in advance.
- Attachments
-
- Report_PageN.mrt
- (4.71 KiB) Downloaded 500 times
Re: Page number and line number in data source
Hello.
Could you send us your report template with data for analysis.
Thank you.
Please, try to set the Print On property.Niqu wrote:I want have page number on page when number of page is greater than 1. I tried using system variables, but all failed. I used conditions like "TotalPageCount == 1", "TotalPageCount > 1", "IsFirstPage == IsLastPage", "IsFirstPage == true && IsLastPage == true" - when i was displaying values of this variables, they were correct, but conditions didn't work. I add attachment to show it. Maybe i am doing something wrong - on 90% i am doing something wrong, becouse it should work, but i am not sure what unfortunately.
We didn't get where do you set filter.Niqu wrote:I have three data source with the same business obcjet and they display similar field, but in different place of report and the data i want to display in each data source is different. I have field name "Type" (it is int) and when the value of this field is 0 i want to display it in first data source, if the value is 1 i want to display it in second data source, etc. I tried using filter, but it didn't work, becouse all data sources take the last added filter, not their own filter. So i used conditions on all fields and it work as i wanted (but still don't know why filters didn't work). And now i also want to display line in each data source starting from 1. I was trying using system variables Line and LineThrough and GroupLine, but it never work fine.
Could you send us your report template with data for analysis.
Thank you.
Re: Page number and line number in data source
Sorry, but i am a bit confuse now. Can you explain a bit more?Aleksey Andreyanov wrote: Please, try to set the Print On property.
I have set Print On property to All Pages, becouse i want to print it on all pages if TotalPageCount is greater than 1, and i don't want to print it on any pages if TotalPageCount is equal 1.
I open new report with only one page (so TotalPageCount was equal 1 - i display it to check) and did two if:
1. {IIF(TotalPageCount == 1,
"It work",
"It do not work")}
2. {IIF(ToWords(TotalPageCount) == "1",
"It work",
"It do not work")}
both return "It do not work".
About the second problem i will try to make report with some data and i will send it to you.
Edit:
I add attachments to simply project, if it is not a problem.
This report is similar to my report, so i think fixing it also will fix problems in my report. Propobly i did something wrong, but at the moment i dont have any idea how to do it correct.
In business object is 12 rows. 4 rows has type 0, 4 rows has type 1, 4 rows has type 2. Each row with different type are in different data source. I think first data source work fine, but rest no much - as you can see i put data in Conditions (when i put filter "Users.Type == 1" and "Users.Type == 2" on this data source, both show me data with type 2). It propobly is the reason why Line do not show in case of 1,2,3,4 dispaly 2,5,8,11 and 3,6,9,12.
I hope you will understand what i want to achive.
Thank you in advance.
- Attachments
-
- StimulsoftWpfApplication.zip
- (1.69 MiB) Downloaded 529 times
Re: Page number and line number in data source
Hello.
Please try to use your first condition "TotalPageCount == 1" and set the Number of Pass property of the report to Double Pass.
Thank you.
It's impossible to findout the final amount of pages at the rendering time. When the page number text component is rendering on the first page there is only one rendered page at all and it's unknown whether will be another page.Niqu wrote:Sorry, but i am a bit confuse now. Can you explain a bit more?
I have set Print On property to All Pages, becouse i want to print it on all pages if TotalPageCount is greater than 1, and i don't want to print it on any pages if TotalPageCount is equal 1.
I open new report with only one page (so TotalPageCount was equal 1 - i display it to check) and did two if:
1. {IIF(TotalPageCount == 1,
"It work",
"It do not work")}
2. {IIF(ToWords(TotalPageCount) == "1",
"It work",
"It do not work")}
both return "It do not work".
Please try to use your first condition "TotalPageCount == 1" and set the Number of Pass property of the report to Double Pass.
You sample report is rendered right. I set the condition on the each text component but it better to set it on the band. The Line variable shows the current band number and it shows right value because other bands are shrunk.Niqu wrote:About the second problem i will try to make report with some data and i will send it to you.
Edit:
I add attachments to simply project, if it is not a problem.
This report is similar to my report, so i think fixing it also will fix problems in my report. Propobly i did something wrong, but at the moment i dont have any idea how to do it correct.
In business object is 12 rows. 4 rows has type 0, 4 rows has type 1, 4 rows has type 2. Each row with different type are in different data source. I think first data source work fine, but rest no much - as you can see i put data in Conditions (when i put filter "Users.Type == 1" and "Users.Type == 2" on this data source, both show me data with type 2). It propobly is the reason why Line do not show in case of 1,2,3,4 dispaly 2,5,8,11 and 3,6,9,12.
I hope you will understand what i want to achive.
Thank you.
- Attachments
-
- Report.mdc
- (52.71 KiB) Downloaded 461 times
Re: Page number and line number in data source
Oh, I know it is rendered right. Your program work very good I just do not know how to do some things and it is the reason why i am asking.Aleksey Andreyanov wrote: You sample report is rendered right. I set the condition on the each text component but it better to set it on the band. The Line variable shows the current band number and it shows right value because other bands are shrunk.
I understand what you're saying, but it does not solve my problem. I want to show the number of each display row (except those not displayed), as it is done in the first data source where I used a filter. The use of the conditions is not entirely good, because as you said variable Line is also increased by the not displayed lines - the result is that instead of numbers 1,2,3, ... I got 2,5,8, ... (or something similar). So is it possible to get what i want by changing something or do something otherwise?
Edit: When I set the Number of Pass property of the report to Double Pass, it works as i wanted. Thank you for help.
Re: Page number and line number in data source
Hello.
There is still not full support of business objects, but we working on it and solving all customers problems.
Due to temporary problem with business objects if you use the same BO in different Data Band it's necessary to add next string to Begin Render event on the each Data Band.Please, look at the attached report template.
Thank you.
As I wrote before you should use Filter property of the Data Band but not the Condition of the Text Components.Niqu wrote:Oh, I know it is rendered right. Your program work very good I just do not know how to do some things and it is the reason why i am asking.
I understand what you're saying, but it does not solve my problem. I want to show the number of each display row (except those not displayed), as it is done in the first data source where I used a filter. The use of the conditions is not entirely good, because as you said variable Line is also increased by the not displayed lines - the result is that instead of numbers 1,2,3, ... I got 2,5,8, ... (or something similar). So is it possible to get what i want by changing something or do something otherwise?
Edit: When I set the Number of Pass property of the report to Double Pass, it works as i wanted. Thank you for help.
There is still not full support of business objects, but we working on it and solving all customers problems.
Due to temporary problem with business objects if you use the same BO in different Data Band it's necessary to add next string to Begin Render event on the each Data Band.
Code: Select all
Users.OwnerBand = DataBand1;
Re: Page number and line number in data source
This is what i needed. Everything works good. Thank you for help.
Re: Page number and line number in data source
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.