borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Crystal reports and VB 6)Next Topic (calling crystal report from java ??) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : Changing Crystal Header
Poster Message
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488

icon Changing Crystal Header

Chock sent me this question and I am unable to help him...so if anyone can help plz do...

quote:
all reports are showing correct except 1 report the data is coming correct but the date in the Group header which i pass from vB is not showing correctly the previous date is showing I also tried by giving Discard Save Data, and also i tried by ticking the check box in the File menu --> Option --> Reporting Tab --> [Discard Saved Date while loading Report] and also I tried by uncheck the box [Save Date With Repot]. Then also its not working.


pfdt = txtpfrom.Text
ptdt = txtpto.Text
If Len(cmbPprod.Text) <= 0 Or cmbPprod.Text = "All" Then
   CrystalReport1.ReportFileName = App.Path & "sumcstwisewgt.rpt"
   strsf = "{Sales.SoldDate} in Date(" & _
   Format(pfdt, "YYYY,M,D") & ") to Date(" & _
   Format(ptdt, "YYYY,M,D") & ")"
   CrystalReport1.ReplaceSelectionFormula (strsf)
   CrystalReport1.Formulas(0) = "fdt='" & pfdt & "'"
   CrystalReport1.Formulas(3) = "tdt='" & ptdt & "'"

   CrystalReport1.DiscardSavedData = True
   CrystalReport1.Action = 1
Else
   CrystalReport1.ReportFileName = App.Path & "sumcstwise.rpt"
   strsf = "{ST030100.ST03015} in Date(" & _
   Format(pfdt, "YYYY,M,D") & ") to Date(" & _
   Format(ptdt, "YYYY,M,D") & ")"
   CrystalReport1.ReplaceSelectionFormula (strsf)
   CrystalReport1.Formulas(0) = "fdt='" & pfdt & "'"
   CrystalReport1.Formulas(3) = "tdt='" & ptdt & "'"

   CrystalReport1.GroupSelectionFormula = "{ST030100.ST03018}='" & cmbPprod.Text & "'"
   CrystalReport1.DiscardSavedData = True
   CrystalReport1.Action = 1
End If
   CrystalReport1.GroupSelectionFormula = " "
End Sub



____________________________
Eggheads unite! You have nothing to lose but your yolks.
23-05-2003 at 02:14 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Reporting tools : Changing Crystal Header
Previous Topic (Crystal reports and VB 6)Next Topic (calling crystal report from java ??) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder