Formulas in Crystal Report 4.6 ActiveX 
Author Message
 Formulas in Crystal Report 4.6 ActiveX

I can't pass VB data to formulas (error message !), I only can pass fixed
values ?

Is it possible to to pass Vb datas ? ant how ?

- what is possible :
        CrystalReport1.GroupSelectionFormula =
"totext({SpringCalendar.EvtsDates}) = 'string'"

-what I want :
        Dim myStr as string
        myStr = "11/05/97"
        CrystalReport1.GroupSelectionFormula =
"totext({SpringCalendar.EvtsDates}) = myStr"

Or something like that...

Thanks

___________________Alain Sgalou



Fri, 22 Mar 2002 03:00:00 GMT  
 Formulas in Crystal Report 4.6 ActiveX
I went through this headache a little while ago, so it is slipping from my
memory, but here's some code that worked for me.

    Dim dFrom As Date
    Dim dTo As Date
    Dim df As String
    Dim dt As String

    dFrom = CDate(txtFrom.Text)
    dTo = CDate(txtTo.Text)
    df = Format(dFrom, "yyyy, mm, dd")
    dt = Format(dTo, "yyyy, mm, dd")
    DateString = "Date(" & df & ") to Date(" & dt & ")"

   frmDataEnv.CrystalReport1.ReplaceSelectionFormula
"{Q_DailyGasSummary.FlowDate} in " & DateString

Truth be told, I don't remember why I wrote it this way.

-Sidart


Quote:
> I can't pass VB data to formulas (error message !), I only can pass fixed
> values ?

> Is it possible to to pass Vb datas ? ant how ?

> - what is possible :
>         CrystalReport1.GroupSelectionFormula =
> "totext({SpringCalendar.EvtsDates}) = 'string'"

> -what I want :
>         Dim myStr as string
>         myStr = "11/05/97"
>         CrystalReport1.GroupSelectionFormula =
> "totext({SpringCalendar.EvtsDates}) = myStr"

> Or something like that...

> Thanks

> ___________________Alain Sgalou



Fri, 22 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Formulas in Crystal Report 4.6 ActiveX, 2°

2. Crystal Report 4.6 in Crystal Report 6.0

3. ActiveX Crystal Report Control 4.6

4. CR 4.6 report selection formula

5. Problem refreshing report data in crystal reports 4.6

6. Crystal Reports 4.6 / VB5 Tables in Report

7. Crystal Report 4.6 and Sub report

8. Migrating from Crystal Reports 4.6 to 5.0 Professional.

9. VB5 and Crystal Reports 4.6.

10. Access 2000 and Crystal Reports 4.6

11. *** Crystal Report 4.6 ***

12. Referencing stored procedure parameters in crystal reports 4.6

 

 
Powered by phpBB® Forum Software