TougToug Posted February 21, 2005 Posted February 21, 2005 Hi i'm trying to write a script creating a report and i need somewhere some steps to pull information from several portal rows into 1 or many fields horizontally in my report... Let's expand: I have a layout (labreport) where i enter results from tests in a portal (from Result table) My report is showing records mainly from an other table (testdetail) so i need to get the results related to each records and fill them in the report. So far i've been told that i should use 1 field in my report and Concatenate, so here i am trying to do this but i'm having trouble scripting the fact that the results are coming from portalrows What i have is something like: Go to related record (...) Go to portal row (first) Set Field (results=results1) Go to portal row (next) Set Field (results=results2) etc... and the Result field on the report is a calculation field such as Result=result1 & result2 & etc... and it doesnt show any error but instead of filling in the true results, it puts a set of 0 Any suggestion on how to sort this mess would be much apreciated THANKS
aaa Posted February 21, 2005 Posted February 21, 2005 Why "Go to related record"? I think that this will work if you will delete "Go to related record" script or i didnt understand you.
TougToug Posted February 22, 2005 Author Posted February 22, 2005 Thanks it does solve the problem of filling in only one record instead of all records in the report, but i still get 0 everywhere, any idea why??
-Queue- Posted February 22, 2005 Posted February 22, 2005 It's much easier to do this from the related table. Set Field [Results; ""] Go to Related Record [show only related; "ResultRelationship"; using Layout "Results"] Loop Set Field [LabReportRelationship::Results; LabReportRelationship::Results & ResultField &
TougToug Posted February 23, 2005 Author Posted February 23, 2005 It must be the cold weather and the snow we have today, but my brain is not in gear, and i really can't see how to use these steps... I tried the ValueList solution, no more luck in there, i'm getting "?" everywhere.. This is all very confusing _ "Set Field [Results;""]" _ what do u set it to?? _ "Set Field [LabReportRelationship::Results ; LabReportRelationship::Results & ReultField &
TougToug Posted February 23, 2005 Author Posted February 23, 2005 I think it must have finally defrost up there... I now understand a bit more what's going on Although i still have 2 issues: _it only display the last result value (how can i make it store all of them and display horizontally?) _it only operate on 1 single record of the report attached is the part of my script "trying" to do it all THANKS for your help
-Queue- Posted February 23, 2005 Posted February 23, 2005 Well, you said you wanted to concatenate the related results into one field, which is what the concatenation step does, although if you want to display it horizontally, change the
TougToug Posted February 24, 2005 Author Posted February 24, 2005 Well, thank you for your explanation, it's almost there but still missing something... Attached are my db, my relationships graph and my new version of the script. It is written a bit simpler than you suggested but at least i know wht i'm doing It works except the fact that it only fills in results for the active "test no" in the "Lab Report" layout I think the tricky part in this is that in the "Lab Report" layout, it is 1 single record grouping all the "test no" but in the report >> "Test Report" layout >> it is multiple records... Fyi, the perform find is not finalized yet but it should only find one record and the result field on the report concatenate the 10 results fields (result1 &" , "& result2 &" , "& result3 & etc...) On the latter part i have something that looks like a bug because when i put sample records to try, 1,2,3,4,5,6 works fine (displayed as such) but when i have 81,82,83,84,85,86 it displays 8.1828E+11 (but if i click into the field in browse mode it does shows the correct info ) THANKS for your help, it is much appreciated script.zip
-Queue- Posted February 24, 2005 Posted February 24, 2005 Test Detail::Results is a number field. It should be text. 81, 82, 83, 84, 85, 86 makes no sense as a number.
TougToug Posted February 28, 2005 Author Posted February 28, 2005 Thanks a lot, that was it, works perfectly fine now
Recommended Posts
This topic is 7211 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now