Solved

Printing a variable heading on a Crystal Report

Posted on 1998-09-21
3
172 Views
Last Modified: 2010-04-30
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.
0
Comment
Question by:pcorreya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 100 total points
ID: 1435999
You can replace the report title like this:

CrystalReport1.ReportTitle = "Lab Sample Batches From:" & _
  format(Frdate,"Short Date") & " To:" & _
  format(Todate,"Short Date")

I always just fill the report title with x's to make it long enough to hold my longest title (& then some).
0
 
LVL 1

Author Comment

by:pcorreya
ID: 1436000
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.
0
 
LVL 2

Expert Comment

by:cero
ID: 2632337
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.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question