cancel
Showing results for 
Search instead for 
Did you mean: 

Can Crystal automatically format ad-hoc data?

markberry2
Explorer
0 Kudos

HI,

I'm using Crystal Reports XI with the RDC component embedded in a custom VB6 application. The VB6 app does parameter selection and SQL data retrieval before passing the ADO datasets to the report object (oCRXReport.Database.SetDataSource).

Increasingly I'm getting requests from users to see special data excerpts. I can either write a quick SQL statement and paste the Query Analyzer results into Excel, or I can go through the labor-intensive process of creating a new Crystal report to format the columns etc.

Is there any way to combine the two? Can I throw a random ADO dataset at a CRX report object, and have it return a super-basic report showing the rows and columns (with column headers = field names)? If so, how would I do that?

Note that I am NOT asking about giving the users direct access to Crystal Designer, because they do not have direct access to the database (and they wouldn't know how to deal with its multi-tiered structure if they did).

Thanks,

Mark

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Mark;

The Active Data route would be the closest match for this. However, the report would have to have some structure defined beforehand.

Have a look at:

https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/9066c0db-731e-2b10-e1ab-f25790420ae8

Another option would be unbound fields:

[Unbound Fields|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313332333033313337%7D.do]

Regards,

Jonathan

markberry2
Explorer
0 Kudos

Hi Jonathan,

Thanks for those references.

As mentioned, I'm already using SetDataSource, which I guess means I have an Active Data Source. As you say, that requires the report to be defined beforehand. The first document you reference confirms this:

"The report is designed to only read the Command object once (at the original design of the report) to retrieve the recordsetu2019s structure. Any changes to the Command object or Data Environment are not actively updated."

As for Unbound Fields, it looks like again that requires knowing the names of the fields in advance.

I suppose in either case I could try to create a generic report with Field01, Field02, ... but even then I would be making assumptions about field width and data types.

It seems there is no way to get Crystal to dynamically generate a report when the source data is simply "select * from MyView".

Maybe the solution is to forget Crystal and display the data in a grid in the application. I use a Component One FlexGrid elsewhere, which allows printing or exporting.

Mark

former_member183750
Active Contributor
0 Kudos

With the RDC, you can use the Report Creation APIs (RCAPI). RCAPI does involve extra licensing and this depends on the version of CR you are using. For CR XI r2, see the rdcsdk_com_dg.chm

in this directory:

C:Program FilesBusiness ObjectsCrystal Reports 11.5Helpen dcsdk_com_dg_docdoc

Also, search the [notes|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true] database for more information re RCAPIs.

Ludek

Answers (0)