fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: Cannot Open SomeIndex.CDX when starting ReportPro 2.17

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 5 days 21 hours ago #1

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 58
Hi. I'm having a problem with SOME reports created in ReportPro 2.17. SOME start with an error saying cannot find "whatever.cdx" despite the fact that there is no possible way that index can be open anywhere else. Any clues at all please? If I click OK, the error goes away and thew report works fine...



Jeff

Please Log in or Create an account to join the conversation.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 5 days 21 hours ago #2

  wriedmann's Avatar wriedmann Offline Posts: 1491
Hi Jeff,

are you using the Vulcan runtime or the X# runtime?

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 5 days 19 hours ago #3

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 58
VO runtime.

Please Log in or Create an account to join the conversation.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 5 days 18 hours ago #4

  FFF's Avatar FFF Offline Posts: 532
Jeff,
you write the error is "cannot find" - so it shouldn't matter, whether the cdx is already in use.

Maybe it's related with my open ticket from last year <g>:
Doubleclicking a rpt, it opens the designer, but if the datapath in such a rpt is not correct (e.g. accessing on another machine), RP2 complains and let you select the data.dbf, but immediately complains again about missing cdx, because it looks for the cdx in the old folderpath, instead of the new one - and there's no possibility to select the path for the index.
Karl

Please Log in or Create an account to join the conversation.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 5 days 1 hour ago #5

  Jamal's Avatar Jamal Offline Posts: 58
One cause: If your CDX key expression contains user defined functions, RP does NOT know about them and thus the error.
However, just ignore it.

Please Log in or Create an account to join the conversation.

Last edit: by Jamal.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 4 days 19 hours ago #6

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 58
Hi Karl and Jamal, I'm not OVERLY concerned by it, but I'm worried the end users will be...


Jeff

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 4 days 19 hours ago #7

  Jamal's Avatar Jamal Offline Posts: 58
Well, should we assume you did not write any code to open the report yet?

If not, see oReport:SetReportStringAttribute( ) in the RP docs. This is from RP 3, but it should be the same in RP 2.x if I recall. It has attribute values for dbf path, index driver, table, index file, tag, work_area. If you set those properly, the report will open fine.

Please Log in or Create an account to join the conversation.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 2 days 20 hours ago #8

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 58
Well as usual I've looked everywhere for SetReportStringAttribute but it doesn't appear to be in v2.x even Google searches return only results for RP 3.x

Any other ideas anyone?

This is an example that I'm trying at the moment:

METHOD PushButton10( ) CLASS MainMenu
Local oReport as RpReport
LOCAL aDBS[0] as ARRAY
Local CsTR as string
AAdd(aDBS,{"details.dbf","Job Details Table","DBFCDX",FALSE})
AAdd(aDBS,{"client.dbf","Client Table","DBFCDX",FALSE})
CsTR := WorkDir() + "BMInvoice.rpt"
oReport := RpReport{self, aDBS}
oReport:LoadRpt("BMInvoice.RPT")
RETURN nil

That's the entire thing. I just want to open my RPT file in the Designer, but it won't get past the "Cannot Open Client.CDX" Attsached is the actual report causing me the grief. The whole idea is, this Report - BMInvoice is going to be used as a template so the end user can modify their invoice to suit themselves (in much the same way as MYOB does)
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Cannot Open SomeIndex.CDX when starting ReportPro 2.17 2 days 20 hours ago #9

  robert's Avatar robert Offline Posts: 901
Jeff,
Your report uses:
- C:\CAVO28\BIN\DETAILS.DBF with Alias Details
- DETAILS.CDX (note no path specified, so should be opened in the same folder as the DBF
- C:\CAVO28\BIN\CLIENT.DBF with alias Client
- C:\CAVO28\BIN\CLIENT.CDX
The relation between the two tables is Client.Clcode = Details.Clcode
To override the file names at runtime simply copy all the files to one folder and pass that foldername in the cDataPath parameter or pass the aDBFSwap array and specify details per file:
oReport := RpReport{oOwner, cFilename, [cDatapath], [aDbfSwap]}

aDbfSwap Allows you to swap out the tables used in the report. While this parameter applies primarily to RDD tables, it can also be used to substitute tables in a SQL query.
Any value of the array that you do not wish to change should be specified as NIL. If you specify NULL_STRING, the value will be changed to the empty string value.
The format of the array is:

{{RPAlias, Table File, Index File, Index Tag, RDD, RDDAlias}, {...}, ...}

RPAlias The alias which ReportPro has assigned to the table. This character value can be found in the Setup Sections dialog. This is the key used to designate which table in the data set is being replaced so it must exactly match the ReportPro alias.

Table File The complete path and file name of the substituted table.
Index File The index file to use in place of the index filename specified in the Setup Sections dialog.
Index Tag The index tag used in conjunction with the Index File specified above. If the Index File is specified, you must specify a Tag for DBFCDX and DBFMDX RDDs.
RDD The RDD to use with this table.
RDDAlias When specified, this element forces ReportPro to use an already open DBF table instead of opening the one specified in the report. This element can be the alias name, the work area number or the DBServer of the already open table.

In your case the RpAlias is "Details" for the first table and "Client " for the second table.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1