Reports for WinForms

C1 Designer do not recognize Pages – Report

  •  senthilpng said 9 months, 2 weeks ago:

    I hava requirement like page number should not display if there are only one total page in the report. I wrote the script like below

    Iif(Pages=1,"","Page: " & [Page] )
    It is not recognizing Pages at condition part. If place the Pages in lable, that value dpslay correctly.

    If I changed the above script like below (instead Pages I use page) It is working. I need to compare total pages. It seems C1 Report designed issues. Please adivse the alternate way.

    Iif(Page=1,"","Page: " & [Page] )

  •  Mohita24p said 9 months, 2 weeks ago:

    Hello,

    In order to hide the page number if the total page count is one, then you may add the following VBScript in the 'OnFormat’ of the ReportFooter :

    if [Page]=1 then
    ftrRight.Visible=False
    end if

    Make sure that the Visible property of the Footer is set to true and the Height is also greater than 0.

    Regards,
    Mohita

    Answer
  •  senthilpng said 9 months, 2 weeks ago:

    if I use Pages instead of Page, it is not working. My requirement is total number of page of the report output is 1 ( only one page output), then we do not need to display page number.

  •  Mohita24p said 9 months, 2 weeks ago:

    Hello,

    I understand your requirement and would like to mention that the above solution will meet the same.

    1. [Pages] cannot be used because it is calculated once all the pages of the report have been rendered and hence does not return any value in the middle of the rendering of the report.
    2. The Report Footer appears only on the last page of the Report. Hence, using the OnFormat of this section.
    If the following condition returns true, this assures that the report has only one page.
    if [Page]=1 then
    ftrRight.Visible=False
    end if
    3. If the report has more than one page, the 'if statement’ would return false and the page number will be displayed on each page.

    Hope it clarifies!

    You may try the same at your end and see if you still face any issues.

    Regards,
    Mohita

  •  senthilpng said 9 months, 2 weeks ago:

    Excellent!!! It is working. Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.