Display query variable
Lars Pelzer
I have a layout which is linked to a B1-query with the type user-query.I've build a query with one (Date)variable, I want to display that date on the report, but coresuite takes the docdate from the first record that's displayed. So the actual question is how to display the parameter that's putted in by the user.
Thank you in advance!
Philipp Knecht
Hi LarsJust use the LD.Par - Tree
For example GetData("LD.Par.MyParam")
hth
Lars Pelzer
Hey Philipp,Yes it works, but it arises a new problem. The date is displayed as YYYYMMDD instead of DD-MM-YYYY. I tried it with an custom TextFormat and with the declaration of the parameter, but it doesn't do the trick. Can you help me out with this one as well?
Thank you again!
Greetz
Philipp Knecht
Hi LarsEvery date coming from a form (be it an input form or regular b1 form) has this format.
Use the LD.ParamDate(date,"dd.MM.yyyy") Function to parse it.
hth
Lars Pelzer
Sorry Philipp, but I don't get it. What's the line I have to put in in the value field?GetData("LD.ParamDate(LD.Par.DocDate,"dd.MM.yyyy")")
This doesn't work.
Philipp Knecht
Hi LarsLook at my sample.
All you need to do is to replace date with your real Date.
(Drag and Drop it from the LD.Par - Tree (Datasources))
hth
Lars Pelzer
I'm sorry Phlipp, but I tried every possibility :bang: .Our parameter in the LD.Par - tree is "DocDate".
Greetz
Lars Pelzer
Philipp,Hereby a screenshot...
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/descecrator/error_forum.JPG]error_forum.JPG[/url]
Philipp Knecht
Hi LarsPlease also add LayoutHelper into the ImportScript (Property on Document Level)
Then all the LD. - Functions will be available.
hth
Lars Pelzer
Thank you Philipp!This did the trick:
LD.ParamDate(GetData("LD.Par.DocDate"), "dd.MM.yyyy")
and
Please also add LayoutHelper into the ImportScript (Property on Document Level)
I've added screenshots.
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/descecrator/scr1.JPG]scr1.JPG[/url]
Lars Pelzer
Screenshot number 2Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/descecrator/scr2.JPG]scr2.JPG[/url]
Philipp Knecht
Thanks LarsYour "HowTo" is appreciated.
Regards
0
Please sign in to leave a comment.
Comments
0 comments