cancel
Showing results for 
Search instead for 
Did you mean: 

Silent generation of report from C++ program

0 Kudos

We are longtime users of CR (currently using CR 2008). We would like to "run" a report from within a C++ program to generate/export an HTML file silently (no user interface or graphics display). It would be great if we could do this with our current CR 2008 software. But, if that is too hard, we would consider upgrading to the latest version. However, we need to know if there is a C++ API to do what we want first.

0 Kudos

Additional info: we are using an SQL relational database through an ODBC data source. We are running on Windows 10.

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

Disclosure: the links below are for my own software tools.

Option 1: DataLink Viewer. User manual section dealing with command line exporting:
https://www.milletsoftware.com/DataLink_Viewer_User_Manual/#Fully-Automated%20Exporting

Option 2: Visual CUT (more expensive but more powerful). User manual section:
https://www.milletsoftware.com/Visual_CUT_User_Manual/#Arguments%20to%20Specify%20Export%20Format

0 Kudos

DataLink Viewer seems to do exactly what we want. Thanks, Ido!

Answers (3)

Answers (3)

0 Kudos

Hi Brad,

You will need to upgrade to VS 2010->2022 and start using Managed C++.

On this old sample page there are 2 C++ samples to get you started:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples

And another link is to my WIKI where you can read all about CR for VS:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Don

ido_millet
Active Contributor
0 Kudos

The two options I described (use C# code to directly use the Crystal runtime) or call a command line to request report export from a 3rd-party Crystal Reports viewer or scheduler can be both totally silent.

Perhaps what is confusing is that only some of the 3rd-party products offer a command line API. Ken provides detailed comparisons for these tools. Consider using the comparisons to locate those products that offer a command line API.

0 Kudos

Thank you for your patience with me and for the additional guidance. This is encouraging. We'll get busy reading Ken's comparisons. Thanks again!

0 Kudos

Hello Ido,

We've reviewed/installed all of the command line programs, and only one seems to do what we want: http://www.crystaldesk.com/. I say "seems", because we have not yet gotten it to run successfully from the command line (it runs only in their desktop app). We are trying to get help from the vendor.

We have also downloaded and installed Crystal for Visual Studio. However, we've been unable to locate any user's guide or example code. If you know where we might find this, I would again be grateful (I've posted another question about this.)

Thanks!

ido_millet
Active Contributor
0 Kudos

Option 1: use the Crystal runtime with Crystal for Visual Studio: https://www.sap.com/products/technology-platform/crystal-visual-studio.html

Option 2: install a 3rd-party Crystal Reports viewer/scheduler that provides a command line api. This would allow your C# code to simply call a command line and pass the report path, parameters, login info, export format, export file, etc. Ken Hamady maintains a list of 3rd-party Crystal utilities here.

0 Kudos

Thank you for your quick reply. Thanks also to Ken Hanady for the extensive list of 3rd party products.

Unfortunately, I don't see that any of your options satisfies my requirements. As I stated, "We would like to "run" a report from within a C++ program to generate/export an HTML file silently (no user interface or graphics display)."

Thanks again!