EDN Admin
Well-known member
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Hi,
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" The french original version is at the end of this post.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I cannot open a subreport in my report.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" My configuration is :
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" SQL Server 2008 R2 Reporting Services (BIDS)
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" SQL Server CE
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Visual Studio 2010 PRO (VB)
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Heres how I do it:
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>1)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I create a RDL report and a RDL subreport with BIDS
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>2)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I copy the RDL files in the directory of my project and I rename them to RDLC
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>3)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" In my project, I add an existing item and I select the RDLC files
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>4)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I open the RDLC reports and I save them (conversion to the RDLC format)
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>5)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I copy the converted RDLC files to in the directory where the files must be stored in order to be used in my application
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>6)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I dont create a ReportViewer control in my form, but in the code.
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>7)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I run my project, the report opens normally, but the subreport displays the error: Failed to recover data for the subreport SubReport_DÃtail_MP_Non_pulvÃrulente,
located in the following location: C:UsersStÃphaneAppDataRoamingPWMAU1.0.0.0SystÃmeSubReport â DÃtail MP Non pulvÃrulente.rdlc. For more information, see the log files.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" For information, I dont create the RDLC report directly in my project because I need the fields from multiple tables and I cant use queries to create RDLC report. This is for
this reason I create first the RDL report with the BIDS then I convert them in my project.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Note that there are no concerns for access to different files, or the SQL CE database.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" About the code below :
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" At the form load, New is executed wich execute Affiche_Rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport execute in turn Affiche_Rapport_et_Sous_rapport
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport_et_Sous_rapport display the report wich contain a subreport and then execute the event SubReportProcessingEventHandler
<span style="font-size:11pt; font-family:"Calibri","sans-serif" SubReportProcessingEventHandler finaly execute Affiche_Sous_rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif"
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Au sujet du code ci-dessous :
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Au chargement du formulaire, New est exÃcutà qui exÃcute Affiche_Rapport.
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport exÃcute à son tour Affiche_Rapport_et_Sous_rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport_et_Sous_rapport affiche le rapport qui contient un sous-rapport et exÃcute ainsi lâÃvÃnement SubReportProcessingEventHandler
<span style="font-size:11pt; font-family:"Calibri","sans-serif" SubReportProcessingEventHandler exÃcute finalement Affiche_Sous_rapport
PS : http://www.gotreportviewer.com or other like google already seen
Thanks for your help,
StÃphane
<span style="font-size:11pt; font-family:"Calibri","sans-serif"
View the full article
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" The french original version is at the end of this post.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I cannot open a subreport in my report.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" My configuration is :
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" SQL Server 2008 R2 Reporting Services (BIDS)
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" SQL Server CE
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Visual Studio 2010 PRO (VB)
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Heres how I do it:
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>1)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I create a RDL report and a RDL subreport with BIDS
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>2)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I copy the RDL files in the directory of my project and I rename them to RDLC
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>3)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" In my project, I add an existing item and I select the RDLC files
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>4)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I open the RDLC reports and I save them (conversion to the RDLC format)
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>5)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I copy the converted RDLC files to in the directory where the files must be stored in order to be used in my application
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>6)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I dont create a ReportViewer control in my form, but in the code.
<p style=" <span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" <span>7)<span style="font:7pt "Times New Roman"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" I run my project, the report opens normally, but the subreport displays the error: Failed to recover data for the subreport SubReport_DÃtail_MP_Non_pulvÃrulente,
located in the following location: C:UsersStÃphaneAppDataRoamingPWMAU1.0.0.0SystÃmeSubReport â DÃtail MP Non pulvÃrulente.rdlc. For more information, see the log files.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" For information, I dont create the RDLC report directly in my project because I need the fields from multiple tables and I cant use queries to create RDLC report. This is for
this reason I create first the RDL report with the BIDS then I convert them in my project.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Note that there are no concerns for access to different files, or the SQL CE database.
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif"
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" About the code below :
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" At the form load, New is executed wich execute Affiche_Rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport execute in turn Affiche_Rapport_et_Sous_rapport
<span lang="EN-US" style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport_et_Sous_rapport display the report wich contain a subreport and then execute the event SubReportProcessingEventHandler
<span style="font-size:11pt; font-family:"Calibri","sans-serif" SubReportProcessingEventHandler finaly execute Affiche_Sous_rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif"
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Au sujet du code ci-dessous :
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Au chargement du formulaire, New est exÃcutà qui exÃcute Affiche_Rapport.
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport exÃcute à son tour Affiche_Rapport_et_Sous_rapport
<span style="font-size:11pt; font-family:"Calibri","sans-serif" Affiche_Rapport_et_Sous_rapport affiche le rapport qui contient un sous-rapport et exÃcute ainsi lâÃvÃnement SubReportProcessingEventHandler
<span style="font-size:11pt; font-family:"Calibri","sans-serif" SubReportProcessingEventHandler exÃcute finalement Affiche_Sous_rapport
PS : http://www.gotreportviewer.com or other like google already seen
Thanks for your help,
StÃphane
<span style="font-size:11pt; font-family:"Calibri","sans-serif"
View the full article