Dear friends,

I'm doing my inventory project in visual studio 2005...

Back-end is ACCESS...

i'm having purchase, sales tables...

I want to know, how to Generate Report(Crystal or Data)...

I need Steps to create and coding associate with it(For both, if it is possible)...

Because i need very urgently...

Plase give me detailed answer.

Please help me...

Thanks in advance...

Dear,

Naveed...

Its really really helpful...

Thank you so much...

I don't know how to thank you...

Really Really thanks for your reply...

Thank you very much...

No problem be happy i can help

If you have any problem in crystal reports you can ask

Dear...

I'm having a problem in CRYSTAL REPORT...

I'm doing project for a company...

I'm using this code for connnection string is...

& Application.StartupPath &

so that it wil automatically take the PATH...

I succeeded in creating CRYSTAL REPORT...

I sent my project EXE, DATABASE FILE, AND CRYSTAL REPORT to my FRIEND... to check whether it is working or not...

CRYSTAL REPORT not WORKED in his system... it is asking for USERNAME and PASSWORD...

i don't know why it is not working...

Please help...

Thanks in advance...

Ok its very simple Use this code it would resolve your problem i hope it would help you

If TextBox1.Text = "" Then
            MessageBox.Show("Please enter Required Field!", "Your Project Name", MessageBoxButtons.OK, MessageBoxIcon.Information)
            Exit Sub
        End If
        TextBox1.Visible = False
        Button1.Visible = False
        Dim cryRpt As New ReportDocument
        cryRpt.Load(Application.StartupPath & "\Rpt1.rpt")
        Dim crParameterFieldDefinitions As ParameterFieldDefinitions
        Dim crParameterFieldDefinition As ParameterFieldDefinition
        Dim crParameterValues As New ParameterValues
        Dim crParameterDiscreteValue As New ParameterDiscreteValue

        crParameterDiscreteValue.Value = TextBox1.Text
        crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields()
        crParameterFieldDefinition = _
        crParameterFieldDefinitions.Item("Your Criteria Column Name")
        crParameterValues = crParameterFieldDefinition.CurrentValues

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

        Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
        Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

        For Each tbCurrent In cryRpt.Database.Tables
            tliCurrent = tbCurrent.LogOnInfo
            With tliCurrent.ConnectionInfo
                .ServerName = Application.StartupPath & "\DB.mdb"
                .UserID = ""
                .Password = ""
                .DatabaseName = Application.StartupPath & "\DB.mdb"
            End With
            tbCurrent.ApplyLogOnInfo(tliCurrent)
        Next tbCurrent


        CrystalReportViewer1.ReportSource = cryRpt
        CrystalReportViewer1.Refresh()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.