Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi...
I mada a dataset and 4 datatable in dataset.I am trying show data into crystal report but it is not working.I show you my coding.


VB
Dim a As New ReportDataset
        Dim DS1 As New DSInvoice
        BindCompanyInfo()
        DS1.Tables("DTCompany").Rows.Add(ds.Tables(0).Rows(0)("CName"), ds.Tables(0).Rows(0)("Add1"), ds.Tables(0).Rows(0)("State"), ds.Tables(0).Rows(0)("City"), ds.Tables(0).Rows(0)("PhoneNo"), ds.Tables(0).Rows(0)("MobileNo"), ds.Tables(0).Rows(0)("EmailId"), ds.Tables(0).Rows(0)("ContPerson"), ds.Tables(0).Rows(0)("FaxNo"), ds.Tables(0).Rows(0)("TinNo"), ds.Tables(0).Rows(0)("LstNo"), ds.Tables(0).Rows(0)("CstNo"), ds.Tables(0).Rows(0)("PanNo"), ds.Tables(0).Rows(0)("CompHOffice"), ds.Tables(0).Rows(0)("ExpiryDate1"), ds.Tables(0).Rows(0)("ExpiryDate2"), ds.Tables(0).Rows(0)("FinYear1"), ds.Tables(0).Rows(0)("FinYear2"))
        DS1.Tables("DTInvMst").Rows.Add(cmbType.Text, cmbInVNo.Text, txtPortOfLoading.Text, txtPortDischarge.Text, dtpBuyerDate.Text, txtOtherRef.Text, txtBuyerOrderNo.Text, txtPreCarriage.Text, dtpRemovalGoods.Text, txtSNo.Text, txtVessel.Text, txtFinalDest.Text, txtExporterRef.Text, txtRateDuty.Text, txtTotalDutyFig.Text, txtWords.Text, txtExamption.Text, dtpDateDebit.Text, dtpInvoice.Text, dtpRoadPermit.Text, txtPLA.Text, txtRGSno.Text, txtRoadPermitNo.Text, dtpRemovalGoods.Text, txtPlaceOfReceipt.Text, txtCountGoods.Text, txtCountDest.Text, txtTermsPaymt.Text, txtexcisevalue.Text, txtExcise1.Text, txtCESSValue.Text, txtTotalCess1.Text, txtEduValue.Text, txtEduCess1.Text, txtAllExcise1.Text, txtSaleTaxValue.Text, txtSaletax1.Text, txtTaxAmt1.Text, txtTotalsale1.Text)
        DS1.Tables("DTCustomer").Rows.Add(txtCustName.Text, txtCustAdd.Text, dtpCust.Text, txtTarrifHeadNo.Text, txtDocument.Text, txtPhoneNo.Text, txtMb.Text, txtTransporter.Text, txtVehicleNo.Text, txtCustInvNo.Text, txtTinNo.Text, txtECC.Text, txtPO.Text, txtGRNo.Text, txtInvoiceNo.Text)
        DS1.Tables("DTInvDetail").Rows.Add(cmbOrderAckNo.Text, txtOrderAckDate.Text, txtPartyName.Text, dgvInvoice.Rows(0).Cells("colDescription").Value, dgvInvoice.Rows(0).Cells("colQty").Value, dgvInvoice.Rows(0).Cells("colRate").Value, dgvInvoice.Rows(0).Cells("colTotal").Value, dgvInvoice.Rows(0).Cells("colkindpackage").Value, dgvInvoice.Rows(0).Cells("colPackageSize").Value, dgvInvoice.Rows(0).Cells("colNetWeight").Value, dgvInvoice.Rows(0).Cells("colGrossWeight").Value, dgvInvoice.Rows(0).Cells("colBatch").Value)
        Path1 = AppDomain.CurrentDomain.BaseDirectory.ToString & "RptInvoice.rpt"
        a.PrintRPT(DS1, Path1, heading)
        a.Show()
Posted
Comments
_Vitor Garcia_ 26-May-14 11:04am    
With the given text I can't help you. Please improve the question (actually i cannot see a question here).

What do you mean with "it is not working" ?
Whats is the error ?
Whats the value of Path1 ?
1989priya 27-May-14 1:37am    
yaa..Its not working.There are no error.Path1 pick up path of crystal report.
Path1 = AppDomain.CurrentDomain.BaseDirectory.ToString & "CrystalInvoice.rpt"
Dim a As New ReportDataset
Dim DS1 As New DataSet1
DS1.Tables("DTInvMst").Rows.Add(cmbType.Text, cmbInVNo.Text, txtPortOfLoading.Text, txtPortDischarge.Text, dtpBuyerDate.Text, txtOtherRef.Text, txtBuyerOrderNo.Text, txtPreCarriage.Text, dtpRemovalGoods.Text, txtSNo.Text, txtVessel.Text, txtFinalDest.Text, txtExporterRef.Text, txtRateDuty.Text, txtTotalDutyFig.Text, txtWords.Text, txtExamption.Text, dtpDateDebit.Text, dtpInvoice.Text, dtpRoadPermit.Text, txtPLA.Text, txtRGSno.Text, txtRoadPermitNo.Text, dtpRemovalGoods.Text, txtPlaceOfReceipt.Text, txtCountGoods.Text, txtCountDest.Text, txtTermsPaymt.Text, txtexcisevalue.Text, txtExcise1.Text, txtCESSValue.Text, txtTotalCess1.Text, txtEduValue.Text, txtEduCess1.Text, txtAllExcise1.Text, txtSaleTaxValue.Text, txtSaletax1.Text, txtTaxAmt1.Text, txtTotalsale1.Text, cmbOrderAckNo.Text, txtOrderAckDate.Text, txtPartyName.Text, dgvInvoice.Rows(0).Cells("colDescription").Value, dgvInvoice.Rows(0).Cells("colQty").Value, dgvInvoice.Rows(0).Cells("colRate").Value, dgvInvoice.Rows(0).Cells("colTotal").Value, dgvInvoice.Rows(0).Cells("colkindpackage").Value, dgvInvoice.Rows(0).Cells("colPackageSize").Value, dgvInvoice.Rows(0).Cells("colNetWeight").Value, dgvInvoice.Rows(0).Cells("colGrossWeight").Value, dgvInvoice.Rows(0).Cells("colBatch").Value, txtCustName.Text, txtCustAdd.Text, dtpCust.Text, txtTarrifHeadNo.Text, txtDocument.Text, txtPhoneNo.Text, txtMb.Text, txtTransporter.Text, txtVehicleNo.Text, txtCustInvNo.Text, txtTinNo.Text, txtECC.Text, txtPO.Text, txtGRNo.Text)
BindCompanyInfo()
DS1.Tables("DTCompany").Rows.Add(ds.Tables(0).Rows(0)("CName"), ds.Tables(0).Rows(0)("Add1"), ds.Tables(0).Rows(0)("State"), ds.Tables(0).Rows(0)("City"), ds.Tables(0).Rows(0)("PhoneNo"), ds.Tables(0).Rows(0)("MobileNo"), ds.Tables(0).Rows(0)("EmailId"), ds.Tables(0).Rows(0)("ContPerson"), ds.Tables(0).Rows(0)("FaxNo"), ds.Tables(0).Rows(0)("TinNo"), ds.Tables(0).Rows(0)("LstNo"), ds.Tables(0).Rows(0)("CstNo"), ds.Tables(0).Rows(0)("PanNo"), ds.Tables(0).Rows(0)("CompHOffice"), ds.Tables(0).Rows(0)("ExpiryDate1"), ds.Tables(0).Rows(0)("ExpiryDate2"), ds.Tables(0).Rows(0)("FinYear1"), ds.Tables(0).Rows(0)("FinYear2"))
Path1 = AppDomain.CurrentDomain.BaseDirectory.ToString & "CrystalInvoice.rpt"
a.PrintRPT(DS1, Path1, heading)
a.Show()
when I get data from my window form,It load data into crystal report but When I get data from dataset,It does not load data into crystal report

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