Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4207
  • Last Modified:

Renaming Subreports

Hello Hackers,

I have a report with subreports, when I save the subreport and load it into another report it keeps the same name.

All works OK, but it looks stupid when the subreports are named incorrectly.

So, is there a way to change the name of the subreport?  Either in the editor where there are subreports as part of the main report, or when the saved subreport is opened by itself?

Cheers,
Bonker.
0
scrumper64
Asked:
scrumper64
  • 4
  • 3
  • 2
  • +1
1 Solution
 
mlmccCommented:
What name are you referring to?  Is this something users of the report see or is it only the report developer?

I use subreports all the time and I only see the reportname during development.

If you are referring to the Windows filename:
If the subreport is to be used only by one report you could rename it through File Manager or Windows Explorer and then just reload it into your main report.

Need a little more info
mlmcc
0
 
scrumper64Author Commented:
It's only the name we see in development in the designer. (using Crystal 8.5 BTW)

It's annoying because we have to use the subreport names in a database table which is used to populate the reports from disconnected recordsets on the Client PCs.

The weird thing is that crystal somehow stores the subreport name (hides it) in the .rpt file when you save it with "Save Subreport As..."
0
 
mlmccCommented:
You could copy and rename in Windows.  Then in CR reimport it and it should show the new name.

mlmcc
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ejiangCommented:
If you are using Crystal Reports 8 or later, you could simply open up the report (that contains this subreport) in the report designer(editor), and then right-click on the subreport, and select "Format Subreport...", there will popup a Format Editor, you can then click on "Subreport" tab, and enter whatever name you want to the "Subreport Name" box. I hope this helps.
0
 
scrumper64Author Commented:
You can't change the name using the Supreport tab you mention :(
0
 
ejiangCommented:
There is another way that you could do to change subreport, which is to take the report and then change its subreport from a VB application using Report Designer Component Object Model. But that will involve a bit of programming in VB, also require that you've got Crystal 8 or later.  What version of Crystal Report do you have?
0
 
scrumper64Author Commented:
Hi, I just revisited this problem and I was able to change the report name programatically with the RDC as you said in your last comment.  This saved me having to recreate the report.
Cheers!
0
 
salepointCommented:
Can this be done with version 8.0 Professional
0
 
salepointCommented:
ejiang/scrumper64:

I have the same issue... using CR 8.0 Pro.  I have several subreports that must be renamed.  They have hyphens in their name, which incidentally causes the SWCS service to crash when trying to send their DB login/password parameters via HTML.

Anyway, I cannot export/rename/import (another feature of Crystal 8.0).  The above option seems the only feasible way.  Can you be more specific.  Do I need 8.0 Developer?  What is the property that needs to be changed?

Thank you.
0
 
scrumper64Author Commented:
The only way I was able to rename a subreport was by doing to progmatically via the RDC.
0
 
salepointCommented:
-- I gathered that from above.  Can you please be more specific?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now