Link to home
Start Free TrialLog in
Avatar of pcorreya
pcorreya

asked on

Printing a variable heading on a Crystal Report

I want to be able to pass the start and end date for the report from my vb application so that it is displayed as part of the crystal report heading. How do I do this. I tried passing it via the formula property of the crystal control from vb, but it doesn't work.
ASKER CERTIFIED SOLUTION
Avatar of trkcorp
trkcorp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pcorreya
pcorreya

ASKER

The crystal control doesn't support a reporttile property. I am using version 4.6 of the control that came along with vb5.

I really want to put the heading in the Title section of the report. Can this be achieved using a formula.
Ok
In the CR designer, you have to put any formula you want, put a name to the formula and then in the edit-formula put "" (double quote)
Next, put the box generated where you want.
In the Visual basic, put
MyForm.MyCRObjet.Formulas(0) = "Title=' My Title '"

MyForm.MyCRObject.Formulas(1) = "Subtitle=' My subtitle '"

Or

Dim VarMyTitle as String
VarMyTitle = "My title"

MyForm.MyCRObjet.Formulas(0) = "Title='" & VarMyTitle & "'"

cero.