You can generate the report:
•By using srv4 report command in an Administrator Command Prompt window on a GN4 server:
srv4 report –opt report_test.xml –db “Driver={SQL Server};Server=mySQLServer;Database=ReportDB;uid=myDbUser;pwd=myPassword;”
To get help about the above command, type:
srv4 help report for help
•By using do.ashx?cmd=report REST command in a browser:
http://localhost/gn4/do.ashx?cmd=report&name=test&db=Driver%3D{SQL%20Server}%3BServer%3DmySQLServer%3BDatabase%3DReportDB%3Buid%3DmyDbUser%3Bpwd%3DmyPassword%3B
This assumes you have a GN4 running on your local host.
Note: because of the URL syntax of the REST command, some characters in the connection string are HTTP escaped.
You can try the following for help:
http://localhost/gn4/do.ashx?cmd=help&name=report&x=docBook
This assumes you have a GN4 running on your local host.
•By using the Report activity in an workflow, setting its ConnectionString property:
For example, you can call the wf_GN4Report.xml workflow passing the connection string to the ODBCString parameter. Then, the ODBCString workflow parameter is copied into the ConnectionString property of all the Report activities of the workflow.
ODBCString:Driver={SQL Server}\;Server=mySQLServer\;Database=ReportDB\;uid=myDbUser\;pwd=myPassword\;;
Note: the workflow parameters are in format name:value;, the semicolon characters in the connection string are escaped by the back-slash.
Note
The reports database must already exists. So, before running the Report command, you have to create manually the empty database, and then the Report command will create (or update) the table inside the database specified by the connection string.