cancel
Showing results for 
Search instead for 
Did you mean: 

Prompted for parameter that should be passed to subreport in CR for VS2008

Former Member
0 Kudos

Reports created in CR10 were used with VS2003. Now I opened the project in VS2008. All reports run well exept reports with subreports.I have a prompt to enter a parameter that should be passed to subreport from main report. The link between main report and subreport is correct and works VS 2003, but not in VS2008. Can anybody help me how to correct it?

Edited by: Marina Yepifantseva on Jun 10, 2008 7:13 PM

View Entire Topic
Former Member
0 Kudos

You can try opening the reports from VS2008 and use the Set Datasource Location by right clicking on the Database Fields inside Field Explorer Window. Remap the fields of the report and try to preview the report.

Please note that the links between the tables must be maintained, in case of multiple tables.

This should upgrade the reports.

Former Member
0 Kudos

Thank you for the reply! I remaped stored procedures that used by main report and subreport, but this did not help me!!!!! The problem is still exists. Maybe I was not really clear, when I was describing it. Let me to start over.

I have reports created in CR10 and used in VS2003 successfully for years. All reports (main and subreports) are using stored procedures as datasources. If I open a report in VS2003 everything is fine as usually. If I open a report (which has a subreport(s)) in VS2008 the CR is prompting to provide a single value for the parameter which is used in subreport link, but normally (inVS2003) I never been asked. I do not understand why the parameter is not passing to subreport from main report during only at runtime. If I testing the report itself in CR10-there no problem, parameter passing.

Former Member
0 Kudos

VS2008 is not compatible with CR10 due to which I thought that updating the reports might help us.

I tried a simple report with a subreport in it having parameters in it in CR10 and tried it in VS2008. I could see the report properly.

If it is with one report I would suggest you to try with a simple new report. Otherewise you can try passing the parameter through code for the subreport and give it a try.

Hope it helps.

Regards,

AG.

Former Member
0 Kudos

Thank you for the reply AG!

Yesterday I did a test, I deleted a subreport from the report and there no problem to view it. So I got an idea to pass parameters thruthg the source code and today I got you reply with the same advise.

Do you have an experience with it? Can you help me with it, please?

Thank you again!

Marina

Edited by: Marina Yepifantseva on Jun 11, 2008 4:03 PM

Former Member
0 Kudos

The ReportDocument object has got a method SetParameterValue() that can be used to pass parameters to the reports.

e.g:

ReportDocumentObject.SetParameterValue("ParameterName","Value");

Hope it helps !