Knowing Viewer Page Count in Windows Forms

How do I determine the total Page Count of the Document in the Viewer?
Due to performance problems, I am breaking my report into 'Groups'.  My Selection Formula is selecting the records for the group.  I have created my own toolbar to move from page to page, but I don't know how many pages are in a group.  Therefore, somehow I need to get the info from the viewer.
Say my group has 10 pages.  I capture the CRViewer.Navigate event and see as I page through the NewPageNumber cycles through until is goes to 11, which is beyond my page count.  The ShowNextPage event acts as if nothing is wrong, and shows me page 10 again!
I've looked through all the help files and only find a way to do this via the Web Viewer, which doesn't do me much good!
Suggestions please!

Hello Steven,
what happens if you use the ShowLastPage() method ?
[Visual Basic]
myCrystalReportViewer.ShowLastPage()
[C#]
crystalReportViewer.ShowLastPage() ;
If it will not display the page 11 then I would doublecheck how many pages this report displays in the CR Designer.
Falk

Similar Messages

  • How can we print the page numbers for TABLE OF CONTENTS form When its excluded from the form page count ?

    Hi Experts,
    We have TABLE OF CONTENTS followed by 100 forms with totally 215 pages.
    We have checked in the Exclude from form page count option for TABLE OF CONTENTS form in Group level.
    The forms followed by TABLE OF CONTENTS form all are using FORMSETPAGENUM rule in footer.
    the very first form followed by TABLE OF CONTENTS form the page number starts at 1 of 215 and the last form ends at 215 of 215.
    Now i want to print the Page number for TABLE OF CONTENTS form alone.
    How can we do that ?  Any thoughts ?
    Regards,
    RAMAN C

    Hi Raman,
    I guess, you have included 'Exclude Page Count' option in Table Of Content (TOC) form.
    There is a limitation in studio. The page number functions (FORM PAGE NUM OF/ FORMSET PAGE NUM OF) will be ineffective when we select the 'Exclude Page Count' option in TOC form. Hence, you was not able to print the Form Page Count in TOC form.
    The only way to print page count is to deselect 'Exclude Page Count' option. Then you can normally print the TOC Page Count in TOC form. However, thiS TOC page count will add to the Total formset Page Count. The Formset Page Count can be controlled through Postransdal using the script [FORMSET PAGE NUM = TotalPages() - 1]
    Regards,
    Mahesh

  • Parsing later version PDF documents for page count

    We send a large number of contracts in PDF format to an EDI application and need to know the page count in advance. We currently use a perl script to parse the PDF files for the following:
    1 0 obj
    <<
    /Type /Pages
    /Kids
    [ 13 0 R
    16 0 R
    /Count 2
    >>
    endobj
    This is the format of the PDF-1.3 documents. Unfortunately, the syntax is different for PDF-1.4,1.5,and 1.6.:
    obj<</Metadata 21 0 R/Outlines 27 0 R/Pages 28
    0R/Type/Catalog>>endobj35 0
    Is it possible to parse the page count from these versions?

    Actually, the fact that your parser EVER WORKED on ANY PDF files is amazing - since the fragment you posted is actually quite unusual for any version of PDF.
    The correct way for you to solve this problem is to get a PDF parser (there are native Perl ones such as Text::PDF) and use that gather the information you need.

  • Can you tell me how I can ask for help with the following Indesign question:  I am a new Indesign user and a Creative Cloud member.  I was using the Window/Pages drop down window to view my pages alphabetically or by page number and also to determine whet

    I am a new Indesign user and a Creative Cloud member.  I was using the Window/Pages drop down window to view my pages alphabetically or by page number and also to determine whether or not my JPEG files were sufficiently HI-Res for the printer.  I don't know how I did it but somehow the window has changed so that now it does not have the alphabetical/numerical/Hi-Res information.  It just shows the pages in a two page spread in numerical order.  How can I restore the window so that I will be able to view the information as I did previously.
    Your help will be appreciated,
    Don Unwin
    [Personal Information Removed]

    The pages panel is not the place where you see this information.  You can customize the Links panel to show all sorts of things, including the page number, effective and actual ppi, and whether the link is OK or needs updating.

  • Page Count Missing From Print Job Status Window

    When I print a multi-page document from TextEdit or AppleWorks, the Print Status window does not show the page count. Instead it always shows "Sheet 1 of 1".
    Both TextEdit and AppleWorks show the document as having four pages. A print preview from AppleWorks confirms the document does have four pages. Yet when the document is printed the Print Status window continues to show only "Sheet 1 of 1" with no indication that the document actually has a total of four pages. Nor does it show which pages is currently printing.
    I am running Mac OS X 10.5.8. If I recall correctly, previous versions of Mac OS X showed both the total page count and the currently printing page number, which incremented as the job printed. As it is, there is no way to know the progress of a large print job.
    Any idea what is wrong?
    Thanks.

    Could some check their print status window while a job is printing? Does it always show "Sheet 1 of 1" or does it show the page count that increments as the job prints?
    Thanks.

  • Page count  dynamically in adobe forms

    Hi,
    There is one requirement where they need to print number of pages based on data flow in internal table. to understand better the requirement here is one example as below:
    for ex; there is one internal table in one page which has 1000 records, the internal table is designed on body page (Design view), on the same page there is one footer which say the current page number based on internal table data. say for ex:  the internal table filled with 100 records in the first [page then it should print page count 1 then the remaining 900 records it fills the second page then it should print on the footer page count 2. similarly for last page  it should print page count 10.
    Note: 1  there is other master pages also but the counting of pages should be for dynamic data in the internal table.
    Note: 2 the actually counting should start with value 2 initialization . means first page count should be 2, 3, 4, ... 11.
    solution: do we need to write some code in the script. If yes please provide the code or is there any way to set the page count for that variable from that point onward with +1 page.
    Please advise. Your answer will be highly appreciated.
    Thanks,

    Hi,
    Could you please explain me where I need to write this piece of code in script editor on design view or in master page. I had already written a code on for that variable on master page layout:ready
    data.#pageSet[0].NEG_PROD_FLOW.LINES.Subform6.PAGES_TEXT.GV_PAGE_COUNT2::ready:layout - (FormCalc, client)
    form.NEG_PROD_FLOW.LINES.PAGES_TEXT
    this.rawValue =  xfa.layout.page(this);
    this.rawValue =  (xfa.layout.pageCount() - xfa.layout.pageSpan(form.NEG_PROD_FLOW.LINES.PAGES_TEXT));
    but i need to start page count initialization with value 2. the first page should display 2
    is that possible to do that.
    please advise.
    Thanks,

  • Problem with Cyrstal Report viewer in a Windows Form App Franework 4.0

    I appear to have a issue with Cyrstal Reports runt-time 13.0.2000.0 in a Windows 7 64 bit environment.
    Crystal Report Viewer is not displaying the report but instead is displaying the logon screen with the database name missing.
    1.) App is a .net windows form app using 4.0 framework compiled in the visual studio 2010.
    Compile machine has the development evironment for crystal report 13.0.2000.0 loaded. Compiled for any CPU.
    The Viewer is setup to access the report using oledb conection with sql server using SQL authentication.
    The Viewer works great for all enviroments except for windows 7 64 bit.

    Hello,
    Set your project for X64 only, and note for 32 bit OS then set it for x86. It's a MSIExec issue and not CR. If MSIExec detects a 64 bit OS but your app is using 32 bits then you'll run into distribution problems.
    If you are using MS SQL Server 2008 then you have to install the Client Tools and select the SQL Native 10 driver. MS doesn't support MDAC DB drivers to MS 2008. Search MS's site for more info.
    You also need to install the 64 bit Client Tools for this to work on a 64 bit OS's.
    If you are using SQL 2005 then you have to use the MS OLE DB Provider for SQL Server, Cr doesn't support the Native driver for 2005.
    I use this configuration all the time so it should work.
    Also, are you using SP 1? The GAC Assembly version always stay the same, it's the dll version we need to know.
    Don

  • I want to know  how to call navigate to page in new window.

    Hi,
    I want to know  how to call navigate to page in new window.
    Following is the code which i am using on Event OnInputProcessing.
    navigation->goto_page( 'index.htm' ).
    From the above code i am able to open the index.htm in the same window.
    but I need the index.htm in the new window.
    Please suggest
    Thanks in advance,
    Nilesh Labde

    Thanks ,
    I was able to find the navigatiion tab, But after entering the The Form name in that TAB, Still the New Page opens in ths SAME window.
    Following is the Code written on the Eevent--> OnInputProcessing
    navigation->next_page( 'NEXT' ).
    In the Navigation TAB
    Start                             Navigation Request                Target
    Sales_Person.htm                   NEXT                            index.htm
    Please suggest.
    Thanks in advance,
    Nilesh Labde

  • Error in Org View page,due to Organization lookup change in CreateUser form

    Hi *,
    I have added a user defined field to the Organization creation form. Then, I want to display this in the Organization lookup window. (i.e. when we click on the Organization field lookup image on the Create User form, the lookup we are getting). Then, using the following procedure (Re: Add new column to the Organization Lookup on Create User page I was able to achieve it.
    1. Create a lookup of field type with the field name being your UDF, and the lookup name like Oraganizations.Country.
    2. Change your display columns in the post you made to be Organizations.Country.
    3. Update your xlWebAdmin_en_US.properties for whichever country you are using and in the section "LOOKUPFIELD column headers" add an entry of "lookupfield.header.organizations.country=Country"
    4. Restart your oim and it should display it now.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    But, after doing that, i'm getting a system error when trying to view the Organization details.
    "2009-11-25 06:14:19,873 ERROR http://XELLERATE.WEBAPP Class/Method: tcManageOrganizationAction/viewOrganizationDetails encounter some problems: {1}
    Thor.API.Exceptions.tcColumnNotFoundException
    at Thor.API.tcMetaDataSet.getStringValue(Unknown Source)"
    But, when i delete the newly added lookup (i.e. Organizations.Country ) from the oim lookups, Organization details view page works again.
    Could you please give me a solution for this......
    Appreciate your previous instructions....
    Regards,
    Chaturanga

    Well I found a solution to it. It looks interesting. Do the folllowing to get rid of it:
    - Just Create another lookup with 'Field' and 'Code' equal to the field name of your UDF. eg as follows:
    Code - ACT_UDF_COUNTRY
    Field - ACT_UDF_COUNTRY
    Field type - Selected
    Required - Not Selected
    Group - Organizations (any arbitrary value)
    This may be required because by defining the field (lookup) for this UDf we are actually assigning it a metadata column code.
    Example if you try to Print the ResultSet returned from 'findOrganizations' API, then the column name returned is 'Organizations.Country' irrespective of 'ACT_UDF_COUNTRY' which would be a usual case with any UDF. So we need to create another lookup to redefine this name back to the UDF column name. It will do the required for you.
    Thanks
    Sunny

  • In the "View"-- "Page Source" window: why can't I select a portion of a URL like I used to in previous versions? If I try, the source text behaves as an active hyperlink instead. This makes copying and editing HTML a pain!

    In want to copy a portion of a URL from the "View" --> "Page Source" window and paste it in my favorite text editor. This used to be a simple action with my mouse (mark portion with left mouse button, dump copy into editor window with middle mouse button). In Firefox 3.6.9, it is not plain text in the "Page Source" window but active hyperlinks (cursor shape changes) and takes me to the website of that URL, which I don't want. How can I get the original behavior (plain text page source) back?

    The code taht you have shown is not the template, it is a document that has been created from a template and renamed with a dwt extension.
    If you load the document into DW then go to menu item Modify->Templates->Detach from Template and save the file, you will have your original template called index.dwt and located in the Templates subdirectory.

  • Crystal Report Windows Forms Viewer Error in 1 Workstation after upgrade of PL

    Hi all,
    We just upgraded SAP from 8.82 PL02 to 8.82 PL15.
    Afterwards, in just 1 workstation, Crystal Reports layouts have Crystal Report Windows Forms Viewer error I attach.
    Before the upgrade this error did not happen.
    No permissions or authorizations were changed  in the workstation.
    The Crystal Reports layouts remain working fine in server and in the other workstations.
    In the workstation following are installed:
    - Operating System Windows 7;
    - Microsoft .NET Framework 4.5;
    - SAP Crystal Reports runtime engine for. NET Framework;
    - Crystal Report 2008 Runtime SP6;
    - Microsoft SQL Server 2008 R2 Native Client.
    All, but the operating system, are equal to the other workstations.
    User has edit access to SAP folders, temp and access to the attach path.
    We already uninstalled SAP client and client agent and re-installed it but with no avail.
    Can anyone help me?
    Thanks in advance.
    Best regards,
    Pedro Mariano

    Hi San Xu,
    Thank you for your input.
    However I'm facing problem with each software is suitable.
    I installed SAP Crystal Reports for SAP Business One (CR 2011 V14.0.4.738), but with no avail.
    Thanks in advance.
    Best regards,
    Pedro Mariano

  • Crystal Report Windows Forms Viewer - No Error Popup

    Similar to this post:  Error message that says "No Error" from CR Viewer, I have just upgraded by Application to .net 4.0 and Crystal Reports 2010. The report viewer works fine the first time a report is loaded, but when I change the parameters on the report, and put the updated report back into the report viewer, I get the message shown above.  The report does not change its parameters and the updated report is not displayed.  The code in question is setting the date parameters for the report.  The user can select new date parameters from the form that encloses the report viewer.  The code subclasses the Report Object code to add additional functions through interfaces.  The IDateRange interface provides a starting and ending date range for the report using a property on the report class as follows:
        Public Property EndingDate() As Date Implements IDateRange.EndingDate
            Get
                Return _endingDate
            End Get
            Set(ByVal value As Date)
                _endingDate = value
                Me.SetParameterValue("EndingDate", value)
            End Set
        End Property
    In addition, the immediate Window shows the following message:
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll
    The code in the Report Viewer looks like this, see line marked in blue for when pop-up appears:
    ''' <summary>
    ''' Sets the report period and displays it.
    ''' </summary>
    ''' <param name="Report">The Report.</param>
    ''' <param name="Refresh">if set to <c>true</c> force a refresh.</param>
    Private Function PFSetReportPeriod(ByVal Report As Object, Optional ByVal Refresh As Boolean = True) As Boolean
        Dim fld As FormulaFieldDefinition
        Dim bRefresh As Boolean = False
        Dim rpt As ReportClass = CType(Report, ReportClass)
        Try
            If CRV.ReportSource IsNot Nothing Then
                rpt = CType(CRV.ReportSource, ReportClass)
            End If
    If TypeOf rpt Is IDateRange Then
        With DirectCast(rpt, IDateRange)
    .        StartingDate = dtpFromDate.Value
    .        EndingDate = dtpToDate.Value
        End With
        SetTitleLine2(DirectCast(Report, ReportClass), bRefresh)
        bRefresh = True
    Else
        If TypeOf rpt Is ReportClass Then
           fld = rpt.DataDefinition.FormulaFields("FromDate")
           If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpFromDate.Value.Year & "," & dtpFromDate.Value.Month & "," & dtpFromDate.Value.Day & ")"
                bRefresh = True
            End If
            fld = rpt.DataDefinition.FormulaFields("ToDate")
            If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpToDate.Value.Year & "," & dtpToDate.Value.Month & "," & dtpToDate.Value.Day & ")"
                bRefresh = True
            End If
            SetTitleLine2(rpt, bRefresh)
        End If
    End If
        If Refresh And bRefresh Then
            If dtpToDate.Value <> CDate(dtpToDate.Tag) OrElse _
               dtpFromDate.Value <> CDate(dtpFromDate.Tag) Then
                    System.Windows.Forms.Application.DoEvents()
                If CRV.Visible Then CRV.ReportSource = rpt ' The popup appears when this statement is executed.
                If CRV.Visible = True Then CRV.Refresh()
                dtpToDate.Tag = dtpToDate.Value
                dtpFromDate.Tag = dtpFromDate.Value
               Return True
            End If
        End If
    Catch ex As Exception
        DisplayException(ex)
    End Try
    Return False
    End Function

    Problem has been resolved.  I downloaded Support Pack 8 (v.13.0.8.1216) from this location.  I then applied the fix from the entry above:
    With CRV ' Report Viewer Control
        If .Visible Then
            If .ParameterFieldInfo IsNot Nothing Then .ParameterFieldInfo.Clear()
            .ReportSource = rpt
            .Refresh()
        End If
    End With
    And no more annoying "No Error" messages.

  • How do you know what view is available to a form?

    A customer requirement that we set the a firstlogin attribute on the on one of the resources the first time a user logs into the IDM end user interface, changes their password, and provides answers for their authentication questions. The way I know that a person has done this, it that they are displayed the "End User Menu"
    The problem is the accounts portion of the User view is not accessible from the End User Menu. I put the same code in the End User Form and it works.
    Is there a way for me to access resource attributes from this form?
    Is this the incorrect approach to solving this problem?
    How do you know what view is available to a form?

    Thanks, that was my problem originally. When using a fieldref I had to set the base context to variables.user i.e.
    baseContext=':variables.user'
    And in workflow I had to preface variable names with the name of the object I checked the view out into.
    What I really wanted to know how to have multiple views open in a form if possible. I'd like to be able to manipulate user and role objects in the same form when editing users in a specific org.

  • I like to know when i use fire fox why it take so much resource of my computer ? it almost 1/4 of my 4gig of memeory , ihave 6,7 page of firefox window open

    i like to know when i use fire fox why it take so much resource of my computer ? it almost 1/4 of my 4 gig of memory , i have 6,-8 page of firefox window open at cpu level its is almost 25% been used up. i see its taking too much resource i wonder why ?? how not to take so much and it crashes often.. any help,ive 24.0 ,

    Firefox add-ons take some memory. This amount varies depending on the add-on.
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    Does this decrease the memory usage? Please report back soon.

  • Windows Forms with ActiveX PDF viewer steals focus when LoadFile called

    I've been very frustrated with the PDF viewer. I currently have the Acrobat Reader 8.1.2 installed and I've created an extremely simple app that has a main window with two additional child windows that are owned by the main window. I've also set a timer to periodically load the same file over and over (to show the focus issue).
    My problem is that if Child1 is currently in Focus, and the timer on Child2 goes off and calls LoadFile(...), then for some reason Child2 steals the focus and comes to the front of the app.
    My Sample Visual Studio 2008 Windows Form code here:
    //Main Window code that creates Child1 and Child2 that have the ActiveX
    //component on them
    namespace PDFViewerStealingFocusIssue
    public partial class MainWindow: Form
    public MainWindow() {
    InitializeComponent();
    private void MainWindow_Load(object sender, EventArgs e) {
    PDFViewerStealingFocusIssue.PDFViewer viewer = new PDFViewer();
    viewer.Text = "Child1";
    viewer.timer1.Interval = 4000;
    viewer.Show(this);
    viewer = new PDFViewer();
    viewer.Text = "Child2";
    viewer.timer1.Interval = 5500;
    viewer.Show(this);
    //in my child window:
    namespace PDFViewerStealingFocusIssue
    public partial class PDFViewer : Form
    public PDFViewer() {
    InitializeComponent();
    private void Form2_Load(object sender, EventArgs e) {
    private void timer1_Tick(object sender, EventArgs e) {
    axAcroPDF1.LoadFile(@"C:\test.pdf");
    //axAcroPDF1.src = @"C:\test.pdf";
    I'd appreciate if anyone has a workaround for stopping this annoying behavior.
    Jeff Braun ([email protected])

    Hi Jeff,
    I have the same problem. Have you found a solution yet? I've spent the past few hours trying to find one to no avail. Your help will be greatly appreciated. If I find anything, I'll be sure to post the solution.
    Thanks,
    Matt

Maybe you are looking for