Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Data Not Refresh in Crystal Report Post Reply Post New Topic
Author Message
Pankajonweb
Newbie
Newbie
Avatar

Joined: 16 Apr 2011
Location: India
Online Status: Offline
Posts: 1
Quote Pankajonweb Replybullet Topic: Data Not Refresh in Crystal Report
    Posted: 17 Apr 2011 at 12:06am
 hi
 
Crystal report showing data after refreshing it two times.
 
Code is
 
 
Call Dime
If rs.State = 1 Then
rs.Close
End If
rs.Source = "Select * from DailyCustomer"
rs.Open
rs.AddNew
rs.Fields("Bill_No") = Me.txtbillno.Text
rs.Fields("Customer_Name") = Me.txtcustomername.Text
rs.Fields("Date") = Me.DTPicker1.Value
rs.Fields("Work") = Me.txtwork.Text
rs.Fields("Amount") = Me.txtamount.Text
rs.Fields("Paid") = Me.txtpaid.Text
rs.Fields("Balance") = Me.txtbalance.Text
rs.Update
rs.Close
'--------
If cmd.State = 1 Then
cmd.Cancel
End If
cmd.CommandText = "Delete * from Temp"
cmd.Execute
cmd.Cancel
If rs.State = 1 Then
rs.Close
End If
rs.Source = "Insert into Temp Select * from DailyCustomer where Bill_No='" & Me.txtbillno.Text & "'"
rs.Open
Me.CrystalReport1.ReportFileName = App.Path & "\rptcustomerbill.RPT"
Me.CrystalReport1.RetrieveDataFiles
Me.CrystalReport1.PrintReport
Set rs = Nothing
con.Close
'--------
Call Dime
If rs.State = 1 Then
rs.Close
End If
rs.Source = "select Bill_No from DailyCustomer where Bill_No = (Select Max(CInt(Bill_No)) from DailyCustomer)"
rs.Open
If Not rs.EOF Then
Me.txtbillno.Text = Val(rs.Fields("Bill_No")) + Val(1)
End If
rs.Close
con.Close
Me.txtwork.Text = ""
Me.txtamount.Text = ""
Me.txtpaid.Text = ""
Me.txtbalance.Text = ""
Me.txtcustomername.Text = ""
 
 
Pankaj
Pankaj Kumar
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.