1

Is there a way to modify the metadata of a Crystal Reports XI report .rpt file as text?
Suppose I need to modify a Crystal Reports XI .rpt file to change a common occurrence
throughout the file. I know if changing a table name or datasource, Crystal Reports
handles the remapping process from old to new. I'm not looking for that.
What I'm looking for here is a way to represent an .rpt file or an object
as text, modify it manually in a text editor and then import it to .rpt format.
A good analogy is Borland Builder 6 forms files (.dfm). I can copy a button object
as text and paste it to a text editor. Modify some properties and events, copy the
object block and paste it back in the Borland Builder 6 design mode window.
Borland Builder 6 knows this text block is a dfm object and pastes it in the
appropriate place, displaying the new modified button per the properties you typed in.
Is there something like this in Crystal Reports?

2 Answers2

0

Unfortunately, not that I'm aware of. There is not even a way to do a search and replace among objects without third-party software (See this post). This is, in my opinion, one of the major flaws of CR.

There's nothing stopping someone from creating the tool that you describe using the Crystal Reports API, though.

Community
  • 1
  • 1
Ryan
  • 7,212
  • 1
  • 17
  • 30
0

With XI, you can do a lot with the SDK, but it will need to be done outside of Crystal Reports. For example, RptToXml.

With 2008, you can create an Add-In. It will add a new, top-level menu to Crystal Reports called 'Add-Ins'. Some quick research suggests that you will only be able to act upon the active report, passed to your code via a parameter (which it copies before your code acts upon it). Sadly, the API doesn't give you access to Crystal Reports itself, which would be really powerful (think macros). I suspect that SAP's OEM partners have access to a more-powerful, add-in SDK.

If you have BusinessObjects Enterprise, you might want to investigate MetaData Manager ($40K).

Another option might be Crystal Reports for Eclipse. Perhaps you can use Eclipse's plug-in framework or a third-party scripting language in combination with it (CR for Eclipse) to do something that meets your needs.

Community
  • 1
  • 1
craig
  • 25,664
  • 27
  • 119
  • 205