Click here to Skip to main content
15,890,995 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

Greeting of the day.

I have made invoices from 1 to 10.

Now I want give range for printing from 1 to 5.

I have been getting print of One page/ bill at a time i.e. 1 or 2 etc.

Kindly tell me how to give range for multiple page. how to give range to printing from (bill no) to (bill no)

I'm passing the under mention parameters to report and display report with the help of rptcrpara.rpt.

I define the number in the textbox1.text i.e. 2 and which call the invoice to print it show the invoice no.2 . Now I want to issue number range i.e. 1 to 5 now problem occurs how to call all five on five pages that.

VB
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class RptParameter
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cryRpt As New RptCrpara
        cryRpt.Load("rptcrpara.rpt")

        Dim crParameterFieldDefinitions As ParameterFieldDefinitions
        Dim crParameterFieldDefinition As ParameterFieldDefinition
        Dim crParameterValues As New ParameterValues
        Dim rvalue As New CrystalDecisions.Shared.ParameterDiscreteValue
        Dim rupee As String = "Rupees"
        rvalue.Value = rupee

        Dim crtextval1 As New ParameterDiscreteValue

        crtextval1.Value = Val(TextBox1.Text)
        crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields()
        crParameterFieldDefinition = _
        crParameterFieldDefinitions.Item("docno")
        crParameterValues = crParameterFieldDefinition.CurrentValues

        crParameterValues.Clear()
        crParameterValues.Add(crtextval1)
        crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)

        CrystalReportViewer1.ReportSource = cryRpt
        CrystalReportViewer1.Refresh()
    End Sub

End Class


Thanks.

Jatinder Gupta.
Posted
Updated 14-Jan-12 5:03am
v4
Comments
Prerak Patel 12-Jan-12 23:39pm    
Sharing some relevant code will make your question clear and easy to understand.
OriginalGriff 14-Jan-12 9:42am    
Based on that information, we can't.
We don't know how your program works, how you are printing, and we can't read your hard drive without removing our tin-foil hats and letting The Voices back in.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

You Are using crystal report. redesign your report and use invoice no. as group redesign report and keep all the detail inside the group. it is the easiest way to solve your problem
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900