on 2024 Apr 11 2:43 AM
How to dynamically pass parameters to SimbaDSN in code ,For example, passing "key file path" as a dynamic parameter?
Request clarification before answering.
Are you getting an error when you run you try to set up the ODBC DSN? When you run your code? If so, what is the error message?
Passing parameters to the report should not be any different than with any other type of data connection. However, I don't see in the supported platforms document that Crystal supports connections to Google BigQuery, so you probably won't be able to use that for data in Crystal.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Dell,
I tried using DSN-Less but it doesn't work. I put the "key file path" in the connection string
such as :
.Servername = "Driver={Simba ODBC Driver for Google BigQuery};OAuthMechanism=0;Email=your-service-account@your-project.iam.gserviceaccount.com;KeyFilePath=path\to\your\service-account-key-file.json;Catalog=your-project-id;"
But I set the Connection String in the crystal report tool and it can connect to the big query and get the data.
such as :
Is there a JDBC driver available? If so, you could use that and configure the key file path as part of that connection string. That's the only way I can think of to be able to pass that value. You can't use a parameter to pass information like this to the connection.
Also, just because you have a working connection does not mean that SAP will actually support connecting to that type of database. If it's not in the Data Sources documentation (https://help.sap.com/docs/link-disclaimer?site=https%3A%2F%2Fassets.cdn.sap.com%2Ftools%2Fsap-cr-202...) then it's not officially supported.
-Dell
First, set up the connection in the report itself instead of in code. It will ask for a URL as part of the configuration for the JDBC connection. If you'll only ever use that connection for the report, you should then be able to just set the credentials to log in to the database in order to get the report to run.
If you need to be able to change the connection, I would debug your application and look at the properties of the report connection to find where you need to set the URL for JDBC.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.