OCX-Control/Object in CR - passing arguments/setting properties? 
Author Message
 OCX-Control/Object in CR - passing arguments/setting properties?

Hello,
maybe somebody can help me to solve my following problem:

I'm working with VB5 and CR 4.6. In order to print labels with data from
an Access-
Database I want to use a OCX-Control for printing barcodes. One field in
the DB and
therefore in the report contains the digits for the barcode. I can
insert the barcode-field - a rectangle - in the detail section ("Insert
- Object...") and I can type digits into the .text-property of the
OCX-control. The control translates the digits into bars - but this
works only in draft mode via manually typing...

Is there a way to pass the content from one DB-/Report-Field to the
Control with VB or CR like

"CrystalReport.OCXFieldname.Text = CrystalReport.barcodedigitfield.Text"

or something similar???

BTW: When using a formula-field the OCX-Control-Field is not shown in
the
expression editor.

Or is the only way to print barcode labels to fill a VB-Form with data
and print
the form with the .PrintForm-method? I can't believe...

Thanks for any help/suggestion

Robert Stahlbock
Hamburg/Germany



Tue, 18 Apr 2000 03:00:00 GMT  
 OCX-Control/Object in CR - passing arguments/setting properties?

If the data is a char field in the database, then all you need do (!!) is


        StringToCode39 ({your_table.your_field})

2. Set the font as Code39-digits.

Note, the above is for data which can be expressed as Code39
barcodes. A working (and workable) font for these is shipped with
CR - c39digit.ttf - at least with the standalone versions of CR.

Warning: other barcode fonts with CR DON'T WORK!!

--
Les Schmalzbach
(remove nospam- to reply).



Quote:
> Hello,
> maybe somebody can help me to solve my following problem:

> I'm working with VB5 and CR 4.6. In order to print labels with data from
> an Access-
> Database I want to use a OCX-Control for printing barcodes. One field in
> the DB and
> therefore in the report contains the digits for the barcode. I can
> insert the barcode-field - a rectangle - in the detail section ("Insert
> - Object...") and I can type digits into the .text-property of the
> OCX-control. The control translates the digits into bars - but this
> works only in draft mode via manually typing...

> Is there a way to pass the content from one DB-/Report-Field to the
> Control with VB or CR like

> "CrystalReport.OCXFieldname.Text = CrystalReport.barcodedigitfield.Text"

> or something similar???

> BTW: When using a formula-field the OCX-Control-Field is not shown in
> the
> expression editor.

> Or is the only way to print barcode labels to fill a VB-Form with data
> and print
> the form with the .PrintForm-method? I can't believe...

> Thanks for any help/suggestion

> Robert Stahlbock
> Hamburg/Germany




Tue, 18 Apr 2000 03:00:00 GMT  
 OCX-Control/Object in CR - passing arguments/setting properties?

There are also available ($$ or is DMDM?) barcode fonts and callable
formula functions from Azalea (US) and CIA (UK, no relation I hope)
which include 2 of 5.

Neither is cheap, and beware: their freebie downloads are functionally
impaired.

--
Les Schmalzbach
(remove nospam- to reply).



Quote:
> Hello Les,

> thanks for your answer, but in my question I forgot to mention, that I
need
> the
> "Interleaved 2 of 5"-Code. So there is no way like your easy way via a
special
> font ("c39digit.ttf" for "Code39"-barcode) ! ?

> BTW: This morning I read about a german tool "List and Label", which
seems to
> solve the problem. It has built in barcode-features incl. Interleaved 2
of 5.
> But: It costs about DEM 900,-- (ca. USD 500,--) [See http://www.combit.de
for
> details].

> Greetings,

> R. Stahlbock
> Hamburg/Germany



Fri, 21 Apr 2000 03:00:00 GMT  
 OCX-Control/Object in CR - passing arguments/setting properties?

Robert,

In my experience, CR can act as an OLE container for certain insertable
objects,
eg. Word documents and some OCXs.

However, in all cases the object must be either linked (from a file) or
embedded.
Unless the object/OCX itself has a mechanism (when inserted into a Crystal
report) to extract data from a database, then my short answer to your
question
is "I don't think this can be done".

CR6 introduces the concepts of the "Active Data Driver" and the "Crystal
Data
Object" which (allegedly) allow *any* sort of data to be passed for
reporting
from a calling VB program. However, we are still investigating this new
functionality - I have not yet tried passing "complex" data like images and
RTF text to CR6.

Regards,
Les Schmalzbach
(remove nospam- to reply).



Quote:
> Hello,
> maybe this is boring, but I have to repeat my question, because I can't
> believe, that there is no (simple) solution for this problem:

> Is there any way to use 'bindable controls' like a barcode-OCX (or any
other
> OCX)
> in CR/VB5 to pass arguments from a database-field (contents from a
> report-field)
> to an OCX-control dynamically at runtime? Or is this absolutely
impossible?

> Les, do you have a suggestion?

> Thanks for any help,

> Robert Stahlbock
> Hamburg/Germany




Sun, 23 Apr 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to Set objects by passing arguments?

2. Displaying values passed in SelectionFormula property (OCX control)

3. Pass Label control through a Property Set statement

4. Pass Label control through a Property Set statement

5. Passing command line arguments to OCX in VB?

6. Passing the List property as an argument

7. Setting a recordset object to a data control's recordsource property

8. Passing an object reference by reference where the object has a default property

9. Passing VB Variable to CR Function in OCX

10. Passing an Object as an argument with ASP

11. Passing arguments by reference to automation object

12. CR5.0/VB4.0 - Passing record sets from VB to CR

 

 
Powered by phpBB® Forum Software