Jump to content

Etiquette de données de format de base de données - DataTag from Database


Recommended Posts

Salut à tous,

 

J'essaye de faire une étiquette de données qui reprend les valeurs d'un format de base de données mais sans que des lignes vides apparaissent. 

 

J'ai essayé de m'inspiré de ce post

 

Hi all, I'm trying to make a data label that takes values from a database format but without blank lines appearing. I tried to take inspiration from this post:

Dans la base de données ci-dessous ont voit que certaines valeur peuvent être vides et je voudrais trouver le raisonnement suivant :

 

si la valeur est vide (ou est égal à un espace) alors n'écrit rien et retourne à la ligne :

 

In the database below we see that some values can be empty and I would like to find the following reasoning: if the value is empty (or is equal to a space) then write nothing and return to the line:

1372440138_CaptureFormatdebddpourLignes.thumb.png.bd42fcb540d298a2f3f1ebd6f6003ff5.png

 

J'ai essayé les formules ci-dessous mais qui ne donnent pas le résultat souhaité

I tried the formulas below but they don't give the desired result:

 

#Format de base de données#.#Ligne 1##WS_IF((#Format de base de données#.#Ligne 2#=' '); ''; CONCAT(CHAR(13); #Format de base de données#.#Ligne 2#))#

 

Résultat Pas de retour à la ligne ni de valeur pour #Format de base de données#.#Ligne 2#

Result: No line break or value for #Format de base de données#.#Ligne 2#

 

et:

#Format de base de données#.#Ligne 1##WS_CONCAT(CHAR(13); (##Format de base de données#.#Ligne 2##))#

 

Résultat : Pas de retour à la ligne mais ok pour la valeur

Result: No line break but ok for the value

 

#Format de base de données#.#Ligne 1##WS_CHAR(13)##Format de base de données#.#Ligne 2##

 

Résultat : le retour à la ligne seul fonctionne

Result: the line break alone works

 

Si quelqu'un à une piste je suis preneur, j'ai lu les explications des fonctions sur https://developer.vectorworks.net/ mais je n'ai sûrement pas le bon raisonnement!

If anyone has a clue, I'm interested, I've read explanations of the functions on https://developer.vectorworks.net/ but I probably don't have the right reasoning!

 

sorry google translate, thanks

 

Merci!

Link to comment

I see a couple of things that are likely to be part of the problem.

 

#Database format#. #Line 1##WS_IF((#Database format#. #Line 2#=' '); ''; CONCAT(CHAR(13); #Database format#. #Line 2#))#

 

 

Assuming that you Copied/Pasted the following line rather than retyped it, there is a space between the two single quotes in the first part of the WS_IF

 

#Database format#. #Line 2#=' ' 

 

Because you put a space there it will only match a value in the Line 2 field that has exactly one space in it.  I think you really want to match an empty string which would be two single quote next to each other with no space.  ''

 

Second, I don't think you can use the # notation INSIDE the WS_IF.  I think you will have to make special tags for each record you are interested in and use the traditional worksheet named instead.  Something like:

 

#Database format#. #Line 1##WS_IF(('Format de base de donnes'.'Line 2'=''); ''; CONCAT(CHAR(13); 'Format de base de donnes'.'Line 2'))#

 

I hope this helps.  Ask again if you need more help.  And please post a small sample file containing your data tag and record formats. It is too hard to try and make a test file that matches exactly what you are trying to do.

Link to comment

Merci beaucoup Pat!

 

Vos explications m'ont vraiment aidé.

La principale erreur était d'utiliser le # à l'intérieur du WS_IF.

J'ai laissé un espace dans une des valeurs par défaut de certaines listes déroulantes vu que je ne suis pas arrivé à créer une vrai ligne vide.

Vous trouverez ci-joint un fichier exemple avec la version 5 qui fonctionne, le format de base de données est lier à un point 2d.

Par contre il faut sélectionner le point 2d pour modifier les données, en éditant les données de l'étiquette seul la ligne 1 est disponible comme sur les captures ci-dessous.

 

Thank you very much Pat!

 

Your explanations really helped me. The main mistake was to use the # inside the WS_IF.

I left a space in one of the default values of some drop-down lists since I couldn't create a real empty line.

Attached is a sample file with version 5 working, the database format is bind to a 2d point.

On the other hand, you must select point 2d to modify the data, by editing the label data only line 1 is available as in the screenshots below.

 

542849374_Capturedonnesdupoint2d.thumb.png.353dc64cd4356b9007c0481ef5ae9b3b.png

 

2127136268_Capturedonnesdeltiquettesuruneligne.thumb.png.16a6da9ca0c16e6663ec8d3444a5daf1.png

 

Le fichier de test est ci-joint.

Merci encore !

Etiquette de données sans ligne vide.vwx

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...