跳到主内容

搜索

搜索

Erreur : [500] Could not execute the specified command: Index was outside of the array

评论

11 条评论

  • Avatar
    pthane

    The solution mentioned in the linked post was that they reinstalled BarTender and that got rid of the error.

    You could also try linking to a different excel spreadsheet and see if that works 

    0
  • Avatar
    qualite

    Thanks for your interest Peter.

    I tried to reinstal BT, Windows and update the different versions of SQL server present on my computer but nothing works.

    Something interesting is that the problem appears only if I use more than 3 tabs in my excel spreadsheet.

    I also opened a ticket in the Bartender support center, but without success until now.

    When I googlize "Index was outside of the array" I can see there is a problem on various software using databases and it often reports SQL, but no solution found so far.

    0
  • Avatar
    pthane

    Thats odd I can link to excel files with multiple worksheets without issue. Try creating a new test label and link to the spreadsheet from that and see what that does, as it could be an issue with the label or spreadsheet themselves where the problem is

    0
  • Avatar
    qualite

    I tried to work on a whole new BT file and a "dumb" Excel file with simple data, in order to reproduce the error.

    Perhaps I'm intenting something that is not possible in BT?

    My 4 excel sheets:

    My table joins:

    My error (having invites or not don't change the error):

    In BT2016 when I had a problem in my joins I used to have an error like "join error".

    0
  • Avatar
    pthane

    You have an extra join command that isn't needed, try removing the 3rd one and see what happens:

     

     

    Mine works correctly without this (Selected Client "Bill" and product 3)

     

    0
  • Avatar
    qualite

    Thanks Peter, I don't have the error anymore.

    However by quitting the "extra" join condition I receive several results as you do.

    As in my original database I have some sets of 3 records with each one its translation (as in my example), at the end I get 3 labels with 3 different translations... 

    There's no way to filter it to have only 1 result?

     

    0
  • Avatar
    pthane

    The problem is the filter and I believe you need to add an extra level to this. I assume it is the Town/Ville you also need to select and so your filter should look somehting like this which as you can see only pulls through one record now 

    0
  • Avatar
    qualite

    One way to solve it is indeed to add an extra filter.

    But an extra filter needs an extra data entry control on the form. In order not to have non consistent information, I put an extra control for the language (linked to Colour.colour) with "Source=query prompt value" and ticked the option "Depends on: client". It works but the operator needs to click in a 1 choice list every time... that seems dumb.

    But I don't understand why we need to add this extra filter as the information is already stored in the database with the  Product (1 product record has 1 town), in your screenshot you already linked the Product.town with Town.town.

     

    With 1 filter on the Product it already filters the town and colour.

    With 1 filter on the Client it already filters the language.

    Or is it where I'm mistaken?

    0
  • Avatar
    pthane

    My guess is the SQL statement needs to be made a custom statement to process the joins correctly as there does seem to be some form of issue with them.

    There maybe another way round this by perhaps conditional printing or VB in the label template itself and when I get a chance I will see if I can work something out

    0
  • Avatar
    pthane

    This should work:

    Add a field on to the side of the label so that it doesn't print and make this a Named field (I called mine LangCheck for language check) and set it as an VB Script > Event Controlled Script. Then click the edit button.

    In the entry box for OnAutoSelectedEvent change the entry to Value = "Y"

    Next click on the OnNewRecord option and in the entry/coding box type in something like this 

    To enter the database field names double click on the database names shown in the column on the right which should be something like client.langue and ville.langue for you. 

    Click Close and Close to come out of the field then right click on Template 1 and go into the Properties of this and click on the button to the right of the Print When box (it will say Always to start off with). On the next screen edit the Conditionally based on expression settings so that the Named Data Source name, set above Equals Y. 

    This should mean that the only label to print will be when the client.langue = ville.langue   

     

     

     

    0
  • Avatar
    qualite

    Good morning Peter,

    Thank you so much, you're a true BT genius!

    As in my original database I have several tables with the problem of language, I had to replicate the conditions for sorting in the vb script, it's not very nice but it works!

    "If Field(language)=Field(origin) and Field(language)=Field(packaging) and ... then"

    I wish you a wonderful week.

    0

请先登录再写评论。