Error: Failed to retrieve report results

LabKey Support Forum (Inactive)
Error: Failed to retrieve report results Jon (LabKey DevOps)  2016-06-08 15:47
Status: Closed
 
Hi Shadi,

I took a look at your file and noticed that you do have a lot of API calls being made, but there are some things I'm confused about here.

1. The insertRows functions you're using appear to not have the toInsert option referencing anything.

Here's an example from our Rlabkey documentation:

newrow <- data.frame(
DisplayFld="Inserted from R"
, TextFld="how its done"
, IntFld= 98
, DoubleFld = 12.345
, DateTimeFld = "03/01/2010"
, BooleanFld= FALSE
, LongTextFld = "Four score and seven years ago"
# , AttachmentFld = NA #attachment fields not supported
, RequiredText = "Veni, vidi, vici"
, RequiredInt = 0
, Category = "LOOKUP2"
, stringsAsFactors=FALSE)

insertedRow <- labkey.insertRows("http://localhost:8080/labkey",
folderPath="/apisamples", schemaName="lists", queryName="AllTypes",
toInsert=newrow)

newRowId <- insertedRow$rows[[1]]$RowId

Notice how there is a newrow data.frame above the actual insertRows call that has toInsert=newrow?

Your insertRows is just doing the API call, but the toInsert value doesn't exist.

labkey.insertRows(baseUrl="Insert Labkey URL",
                  folderPath="Insert Directory",
                  schemaName = "lists",
                  queryName = "QuaSAR_AuDIT",
                  toInsert = import_AuDIT)

So although this is doing an insertRows, there is no import_AuDIT data.frame to work off of here.


2. Also, what is this script supposed to do in the grand scheme of things? You have it deleting and inserting rows, but for an Rview, doing this type of work is unusual since the report shouldn't be removing data or inserting data, but just rendering it using things such as selectRows.

Regards,

Jon