Skip to content

MSSql Connection not working #179

@adriacobo

Description

@adriacobo

Describe the bug
When trying to use your library I getted debug messages, I can't to use it and there is no documented. After a lot of testing we (me and my team) get to the solution that on MSSQL

The messages are:
Error filling reportUnable to get next record from result set.
Error filling reportError executing SQL statement for:

To Reproduce
I use the example mssql connection and the output was:

$options = [
        'format' => ['pdf'],
        'params' => [
          'WHERE' =>  $id,
          'SUBREPORT_DIR' => $base_path.'/app/reports/subreports/'
        ],
        'db_connection' => [
            'driver' => 'generic',
            'host' => 'XXXXXX',
            'port' => '1433',
            'database' => 'XXXXX',
            'username' => 'XXXXX',
            'password' => 'XXXXX',
            'jdbc_dir' => $jdbc_dir,
            'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
            'jdbc_url' => '"jdbc:sqlserver://XXXXXX:1433;databaseName=XXXXX"',
        ]
      ];

jasperstarter process "/Applications/MAMP/htdocs/caepia-app/app/reports/transfer.jrxml" -o "/Applications/MAMP/htdocs/XXX/app/reports/generated/transfer/139" -f pdf -P WHERE="139" -t generic -H XXXXX --db-port 1433 -n XXXXX -u XXXXX -p XXXXX --jdbc-dir /Applications/MAMP/htdocs/XXX/src/JasperStarter/jdbc/ --db-driver com.microsoft.sqlserver.jdbc.SQLServerDriver --db-url jdbc:sqlserver://XXXXXX:1433;databaseName=XXXXX

Where XXXXXX are the correct parameters.

To Solve
We solved putting "" your jdbc_url as
'jdbc_url' => '"jdbc:sqlserver://XXXXXXXX:1433;databaseName=XXXXX"',
Please put that on your docs to future users as possible solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions