Changing the path of the subreport at runtime

  • Thread starter Thread starter raji2678
  • Start date Start date
R

raji2678

I'm using Developer version of Crystal Reports X1. I want to change the
location of the subreport at runtime and save the report with the new
subreport.
I tried
rd.Subreports[0].Close(); //if this is not there next line throws a
notsupported exception.
(rd is the reportdocument)
rd.Subreports[0].Load("c:\\sr.rpt");

rd.Subreports[0].FileName = "c:\\sr.rpt";

When I try rd.saveas(), the new subreport is not coming in the main
report.The old subreport still comes in the main report.
However, when I try rd.subreports[0].export, it is exporting correctly.

Any help will sincerely be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top