How sent to Crystal Report Pro ...

cs_daniel1966 Messages postés 6 Date d'inscription lundi 7 février 2005 Statut Membre Dernière intervention 11 février 2005 - 10 févr. 2005 à 06:32
cs_daniel1966 Messages postés 6 Date d'inscription lundi 7 février 2005 Statut Membre Dernière intervention 11 février 2005 - 11 févr. 2005 à 06:23
I HAVE THIS SAMPLE CODE :
Private Sub Command8_Click()
Dim Name As String
Dim Age As String

Name= "DANIEL"
Age = "28"


cr1.ReportFileName = App.Path & "\raport.rpt"
cr1.RetrieveDataFiles
cr1.PrintReport
'cr1.Action = 1
End Sub

How is posible that send my variable(Name and Age) to Report ?!
My report realize Crystal Reports Pro!

Please !

4 réponses

programmationniste Messages postés 49 Date d'inscription mardi 1 février 2005 Statut Membre Dernière intervention 16 mai 2009
10 févr. 2005 à 06:59
I don't speak very well english but if i understood you want to put your name in the report isn't it

if it's the case you have two solutions

the first is to connect your report to a data base and then
put you name and age into the fields of DB the other
solution is to add to textfields to your report and in the
code you write:



textfield.settext Name

textfield2.settext Age.



these lines must be written in the section containing the textfields
(you can doubleclick in the the section to get directly to its code.



Hope that's what you wanted otherwise tell me more!
0
cs_daniel1966 Messages postés 6 Date d'inscription lundi 7 février 2005 Statut Membre Dernière intervention 11 février 2005
10 févr. 2005 à 08:42
Thank you dear friend but i not used data base , only variable .
Daniel
0
programmationniste Messages postés 49 Date d'inscription mardi 1 février 2005 Statut Membre Dernière intervention 16 mai 2009
10 févr. 2005 à 11:53
so the second solution is the good one?
0
cs_daniel1966 Messages postés 6 Date d'inscription lundi 7 février 2005 Statut Membre Dernière intervention 11 février 2005
11 févr. 2005 à 06:23
Thank you dear friend but not work ... "Invalid qualifier" mesage error !


Please only is posible say me sample cod . Repeat again:


I have 2 variable or constant : First constant is initial "DANIEL" and second constant is initial "28"
How is posible send this duo constant(or variable) to report Crystal Report Pro ?!

Bye! and Thanks again !
0
Rejoignez-nous