dcsimg
Results 1 to 10 of 10

Thread: [RESOLVED] Number out or number Crystal Report / vb.net

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Resolved [RESOLVED] Number out or number Crystal Report / vb.net

    Hello there i have a .net software i made that after a state it printa a custom report form i've made thing is there a value in teh form where lets say i put number 2 i want from it to print 2 pages and on the first page i want the a value say 1 out 2 and on the second 2 out 2 i guess you do that by a loop or something i dont know.

    Thanks in advance.

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,415

    Re: Number out or number Crystal Report / vb.net

    If you are talking about Crystal reports for XI it would be:

    Go to View > Field Explorer.
    Expand on Special Fields.
    Locate the Page Number or Page N of M field and drag the field into the report.

    For other versions you might search the web.
    Please remember next time...elections matter!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Re: Number out or number Crystal Report / vb.net

    Thing is the report is external do im passing fields via parameter fields so im looking for a vs code solution.

  4. #4
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,415

    Re: Number out or number Crystal Report / vb.net

    Quote Originally Posted by xmixmaster View Post
    Thing is the report is external do im passing fields via parameter fields so im looking for a vs code solution.
    I don't understand...the page numbers are part of the Crystal report.
    Please remember next time...elections matter!

  5. #5
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,415

    Re: Number out or number Crystal Report / vb.net

    Here is the tutorial I used back in the beginning to get started:

    http://vb.net-informations.com/cryst...ep_by_step.htm
    Please remember next time...elections matter!

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Re: Number out or number Crystal Report / vb.net

    I have a value from the form i pass the data on the report via vs .. code...lets say i named a field on report as NAME on my app i create a parameterfield for field NAME and imsert the value of tedybox1. I wanna do same with numbers.

  7. #7
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,415

    Re: Number out or number Crystal Report / vb.net

    Quote Originally Posted by xmixmaster View Post
    I have a value from the form i pass the data on the report via vs .. code...lets say i named a field on report as NAME on my app i create a parameterfield for field NAME and imsert the value of tedybox1. I wanna do same with numbers.
    I just posted you a tutorial...see if the solution is in one of the chapters,
    Please remember next time...elections matter!

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Re: Number out or number Crystal Report / vb.net

    Thing is im not using that way report is external so my app loads the report from an external path and fills the fields i've created.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Re: Number out or number Crystal Report / vb.net

    Code:
    Dim paramField12 As New ParameterField()
         Dim discreteVal12 As New ParameterDiscreteValue()
    
         paramField12.ParameterFieldName = "Pallets"
         Dim str12 As String = lblMikos.Text.ToString
         discreteVal12.Value = str12
         paramField12.CurrentValues.Add(discreteVal12)
         paramFields.Add(paramField12)
    
         crViewer.ParameterFieldInfo = paramFields
         crViewer.ReportSource = report
         report.PrintToPrinter(Me.txtSumPallets.Text.ToString, False, 0, 0)
    Thats the way i pass data from the form to my report so i want from the 12th field to count the pages depens on the SumPallets and print 1 out of 2 , 2 out of 2!

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jul 2018
    Posts
    17

    Re: Number out or number Crystal Report / vb.net

    Code:
    Dim paramField12 As New ParameterField()
         Dim discreteVal12 As New ParameterDiscreteValue()
    
         paramField12.ParameterFieldName = "Pallets"
         Dim str12 As String = lblMikos.Text.ToString
         discreteVal12.Value = str12
         paramField12.CurrentValues.Add(discreteVal12)
         paramFields.Add(paramField12)
    
         crViewer.ParameterFieldInfo = paramFields
         crViewer.ReportSource = report
         report.PrintToPrinter(Me.txtSumPallets.Text.ToString, False, 0, 0)
    Thats the way i pass data from the form to my report so i want from the 12th field to count the pages depens on the SumPallets and print 1 out of 2 , 2 out of 2!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width