Denne side indeholder artikler med forskellige perspektiver på Identity & Access Management i private og offentlige organisationer. Artiklerne behandler aktuelle IAM-emner og leveres af producenter, rådgivere og implementeringspartnere.
Jeg lavede engang en funktion, som skulle lave noget lignende, hvor der skulle stå én værdi i felt1 og en tekststreng i felt2. Du kan evt bruge den som inspiration:
'Indre løkke. Opbygger tekststrengen til Felt2 While Not Mid(RS.Fields(1), 5, 1) = "" ' Bliv ved til der kommer en post med kun fire tegn i Felt2 strListOfValues = strListOfValues & "<br><br>" & RS.Fields(0).Value & " " & RS.Fields(1).Value ' Tilføj værdier til Felt2-strengen RS.MoveNext Wend
'Make sure there is something to write If Len(strListOfValues) > 0 Then 'Tilføj post til Tabel1 With Rst .AddNew !felt1 = StrValue !felt2 = strListOfValues .Update End With
Jeg har overvejet, om ikke TreeView-funktionen ville være velegnet til formålet. Har I nogle erfaringer med automatisk dataload af hierarkier til denne ????
Umiddelbart vurderet er det netop via NodeID og ParrentID jeg kan sikre de korrekte summeringer i hierarkiet. TreeView-funktionen skulle så styre strukturen, og data ligge på kontoniveau.
Jeg kunne selvfølgelig oprette strukturen manuelt i TreeView, men der er p.t. tale om 1800 poster i hierarkiet ... ydermere ændrer hierarkiet sig løbende, så et dataload er at foretrække.
A treeview would be a goode idea, but still you need to do it in code to make sure that the structure is correct. (Which lines in the file are related). So if you can get it in one or more table sthen you can also get it in a treeview.
I've now had a very quick look at the data and before it can be used for anything at all then it will be necessary to decide what you need from kontohierarki. For example you could just tak ethose starting with a number and make this the konto number, and the remaining text konto text. For example:
70141 JETPOST NAT REF
would be in tblKont with two fields (kontonr, and kontotekst
Then it woul dbe very easy to have a relationship from that table to the data table on field KontoNr.
I am aware of that ... thats not the issue ... kontonr, and kontotekst is in another "stamdata" table. I only need kontonr in the hierarki-table ...
I need a method/module to determine the right nodeId and parrentId in the TreeView. Notice, that kontonr can be found in different levels of the hierarki ( level 2, 3 , 4 and so on )
You have to realise that I have very little knowledge of your data and your reuqirement. Having the full picture does simplify things.
At the moment I dont have the examples you sent me, so cant refer to them. But I remmeber that there was no really difined structure in the hierarki table. The only thing was the lines which contained a kont number/texts. Thus is why I said that you should decide what you need from the table.
Anyway if we take your example above then a method woud be to loop through the records giving each record a parent node when it gets inserted into the final table. This requires some method of recognising when your at the top level and when you change to a lower level. But as I mentioned, there doesnt seem to be a defined structure, so this isnt going to be easy.
From the above example I can always build a tree placing each node at the correct level. I can always find which nodes are related and also which records contain the actual konto number.
There´s no need to make a solution, I´ve found a work-around method. Actually I´ve found out, that my data-source could do the work for me/us ... but thank´s anyway.
Now I have generated the hierarki, placed data on kontonr-level ... and then what !!
Now I have to figure out the calculation within the hierarki
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.