Upgrading FLD file from VPE 3.6 to VPE 6.1

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Upgrading FLD file from VPE 3.6 to VPE 6.1

Postby mliskin » Sat Jun 04, 2011 7:31 am

We just upgraded from VPE version 3.6 to VPE 6.10, and I'm having trouble working with my templates.

I converted the templates to the new version using the batch command in the Readme.txt file. I have changed my program to work with the new field names and notation. However, when I create a datasourceobject in my code, the FieldCount is 0, so it's not seeing my data definitions.

When I try to use the batch command to convert my original FLD file, All.fld, Dycodoc just opens up a blank document containing all the field definitions from All.fld. It doesn't write an FLDX file.

I don't see any commands on the Dycodoc menus to display the Field Studio, and the Add option is disabled in the Data Definitions window in any of my documents. Am I missing something?

Also, none of the sample illustrate how to iterate through the fields in the datasourceobject. Has this changed since version 3.6, and are there any samples?
mliskin
 
Posts: 5
Joined: Sat Jun 04, 2011 7:23 am

Re: Upgrading FLD file from VPE 3.6 to VPE 6.1

Postby IDEAL Software Support » Mon Jun 06, 2011 8:33 am

The Field Studio has been removed. Instead it has been integrated into dycodoc, it is found in the Data Definitions pane. The toolbar of the Data Definitions pane provides buttons to import old FLD or to import and export new FLDX files.

Note: If you write a DCD (or DCR) document, the field definitions are now stored within the document file. Exporting to an FLDX file is not required, except you wish to use the field definitions in other DCD or DCR documents.

There is a problem in the current version of dycodoc. It does not detect correctly that the VPE SDK is installed. Therefore the toolbar of the Data Definitions pane is disabled. Select from the menu "View | Options" and then enable the checkbox "VPE SDK Compatibility Mode". Afterwards the toolbar of the Data Definitions pane is activated.

We tested the -b commandline option to convert in batch mode an old FLD file to the new FLDX file format. It works as expected.

Also, none of the sample illustrate how to iterate through the fields in the datasourceobject. Has this changed since version 3.6, and are there any samples?


It has not changed since version 3.60.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: Upgrading FLD file from VPE 3.6 to VPE 6.1

Postby mliskin » Mon Jun 06, 2011 4:16 pm

Thanks! In compatibility mode I am able to see the data definitions commands. However, my code still doesn't work. Here is the Visual FoxPro code I've been using with VPE 3.6:

tpl = thisform.vpe1.LoadTemplate(lcTemplate)
oFields = tpl.datasourceobject(0)
for i = 0 to oFields.FieldCount - 1
* look up and set the field value
next

Using the current VPE, oFields.FieldCount always evaluates to 0.
mliskin
 
Posts: 5
Joined: Sat Jun 04, 2011 7:23 am

Re: Upgrading FLD file from VPE 3.6 to VPE 6.1

Postby mliskin » Mon Jun 06, 2011 5:00 pm

I think I figured out the problem. My fields are no longer in tpl.datasourceobject(0). They are in tpl.datasourceobject(3).
mliskin
 
Posts: 5
Joined: Sat Jun 04, 2011 7:23 am

Re: Upgrading FLD file from VPE 3.6 to VPE 6.1

Postby IDEAL Software Support » Mon Jun 06, 2011 5:50 pm

You should not rely that a data source is at a specific index. We recommend to iterate over all data sources and check against DataSource.Prefix (which holds the name of the table) to find the data source index you are looking for.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 15 guests

cron