Solved

Printing a variable heading on a Crystal Report

Posted on 1998-09-21
3
151 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
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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access - Capture pressed key onclick 4 33
VB6 Compile Compatibility Issue 4 102
Determine Range to Select 5 48
using web browser with BING 40 121
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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