Crystal Report Error Missing Parameter when try to open in VS 2013 but working fine in VS 2008 and 2005












0















I convert VS 2005 project to VS 2013 ,everything work fine but Crystal Report give error "Missing Parameter" all reports work fine in VS 2005 but give the same error Missing Parameter in VS 2013



Here is my Code
Dim crReportDocument As
CrystalDecisions.CrystalReports.Engine.ReportDocument
Private Sub OpenReport(ByVal rName As String)
ClientScript.RegisterStartupScript(Me.Page.GetType(), "popupOpener",
"var popup=window.open('" + rName.ToString +
"','','width=768,height=715,resizable=yes,menubar=0,
scrollbars=yes,top=0,left=
0');popup.focus();", True)
End Sub
Private Sub GetReport(ByVal DocumentNo As String, ByVal FromDocumentDate As
String, ByVal ToDocumentDate As String, ByVal ReportType As String)


Dim sParameter(2) As String
Dim sParameterValue(2) As String
Dim NewDocumentNo() As String = DocumentNo.Split("|")
Dim NewFromDocumentDate() As String = FromDocumentDate.Split("|")
Dim NewToDocumentDate() As String = ToDocumentDate.Split("|")

DocumentNo = ""
FromDocumentDate = ""
ToDocumentDate = ""

For i = 0 To NewDocumentNo.Length
If i <> NewDocumentNo.Length Then
If NewDocumentNo.Length = 1 Then
DocumentNo = "'" & NewDocumentNo(i) & "'"
FromDocumentDate = "'" & NewFromDocumentDate(i) & "'"
ToDocumentDate = "'" & NewToDocumentDate(i) & "'"
Else
DocumentNo = DocumentNo & "'" & NewDocumentNo(i) & "'" & ","
FromDocumentDate = FromDocumentDate & "'" & NewFromDocumentDate(i) & "'" & ","
ToDocumentDate = ToDocumentDate & "'" & NewToDocumentDate(i) & "'" & ","
End If
End If
Next

If NewDocumentNo.Length > 1 Then
DocumentNo = Left(DocumentNo, DocumentNo.LastIndexOf(","))
FromDocumentDate = Left(FromDocumentDate, FromDocumentDate.LastIndexOf(","))
ToDocumentDate = Left(ToDocumentDate, ToDocumentDate.LastIndexOf(","))
End If
sParameterValue(1) = " Where C.Transaction_No <> 0 And A.Document_No IN (" & DocumentNo & ")"




Dim rName As String
Dim _Report As New rptObject
crReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument

Select Case ReportType
Case "Cheque"
rName = "rptCheque"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
'Case "ITXJournal"
' rName = "rptITXJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "ITXCashPaymemt"
' rName = "rptITXTransactionDetail"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "Journal"
' rName = "rptJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
Case Else
rName = "rptGLTransactionDetail"
'' rName = "GLReport"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("UserName", Session("UserName"), crReportDocument)
.AddParameter("CompanyName", Session("CompanyName"), crReportDocument)
.AddParameter("VoucherHeading", "Heading", crReportDocument)
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
End Select

crReportDocument.DataSourceConnections.Item(0).SetConnection("KT", "JVC", True)
If cboReportFormat.SelectedValue.Equals("pdf") Then
crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".pdf"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".pdf"))
Else
crReportDocument.ExportToDisk(ExportFormatType.Excel,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".xls"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".xls"))
End If
OpenReport("../Reports/" + rName + "." + cboReportFormat.SelectedValue)
End Sub
#End Region


Sometime report run but don't take parameter and show all record and sometime give error Missing Parameter










share|improve this question























  • Are you using exactly the same version of Cristal Report in your new environment?

    – Siyon DP
    Jan 1 at 9:33













  • I used Version=13.0.2000.0

    – Raheel
    Jan 1 at 10:00
















0















I convert VS 2005 project to VS 2013 ,everything work fine but Crystal Report give error "Missing Parameter" all reports work fine in VS 2005 but give the same error Missing Parameter in VS 2013



Here is my Code
Dim crReportDocument As
CrystalDecisions.CrystalReports.Engine.ReportDocument
Private Sub OpenReport(ByVal rName As String)
ClientScript.RegisterStartupScript(Me.Page.GetType(), "popupOpener",
"var popup=window.open('" + rName.ToString +
"','','width=768,height=715,resizable=yes,menubar=0,
scrollbars=yes,top=0,left=
0');popup.focus();", True)
End Sub
Private Sub GetReport(ByVal DocumentNo As String, ByVal FromDocumentDate As
String, ByVal ToDocumentDate As String, ByVal ReportType As String)


Dim sParameter(2) As String
Dim sParameterValue(2) As String
Dim NewDocumentNo() As String = DocumentNo.Split("|")
Dim NewFromDocumentDate() As String = FromDocumentDate.Split("|")
Dim NewToDocumentDate() As String = ToDocumentDate.Split("|")

DocumentNo = ""
FromDocumentDate = ""
ToDocumentDate = ""

For i = 0 To NewDocumentNo.Length
If i <> NewDocumentNo.Length Then
If NewDocumentNo.Length = 1 Then
DocumentNo = "'" & NewDocumentNo(i) & "'"
FromDocumentDate = "'" & NewFromDocumentDate(i) & "'"
ToDocumentDate = "'" & NewToDocumentDate(i) & "'"
Else
DocumentNo = DocumentNo & "'" & NewDocumentNo(i) & "'" & ","
FromDocumentDate = FromDocumentDate & "'" & NewFromDocumentDate(i) & "'" & ","
ToDocumentDate = ToDocumentDate & "'" & NewToDocumentDate(i) & "'" & ","
End If
End If
Next

If NewDocumentNo.Length > 1 Then
DocumentNo = Left(DocumentNo, DocumentNo.LastIndexOf(","))
FromDocumentDate = Left(FromDocumentDate, FromDocumentDate.LastIndexOf(","))
ToDocumentDate = Left(ToDocumentDate, ToDocumentDate.LastIndexOf(","))
End If
sParameterValue(1) = " Where C.Transaction_No <> 0 And A.Document_No IN (" & DocumentNo & ")"




Dim rName As String
Dim _Report As New rptObject
crReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument

Select Case ReportType
Case "Cheque"
rName = "rptCheque"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
'Case "ITXJournal"
' rName = "rptITXJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "ITXCashPaymemt"
' rName = "rptITXTransactionDetail"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "Journal"
' rName = "rptJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
Case Else
rName = "rptGLTransactionDetail"
'' rName = "GLReport"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("UserName", Session("UserName"), crReportDocument)
.AddParameter("CompanyName", Session("CompanyName"), crReportDocument)
.AddParameter("VoucherHeading", "Heading", crReportDocument)
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
End Select

crReportDocument.DataSourceConnections.Item(0).SetConnection("KT", "JVC", True)
If cboReportFormat.SelectedValue.Equals("pdf") Then
crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".pdf"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".pdf"))
Else
crReportDocument.ExportToDisk(ExportFormatType.Excel,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".xls"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".xls"))
End If
OpenReport("../Reports/" + rName + "." + cboReportFormat.SelectedValue)
End Sub
#End Region


Sometime report run but don't take parameter and show all record and sometime give error Missing Parameter










share|improve this question























  • Are you using exactly the same version of Cristal Report in your new environment?

    – Siyon DP
    Jan 1 at 9:33













  • I used Version=13.0.2000.0

    – Raheel
    Jan 1 at 10:00














0












0








0








I convert VS 2005 project to VS 2013 ,everything work fine but Crystal Report give error "Missing Parameter" all reports work fine in VS 2005 but give the same error Missing Parameter in VS 2013



Here is my Code
Dim crReportDocument As
CrystalDecisions.CrystalReports.Engine.ReportDocument
Private Sub OpenReport(ByVal rName As String)
ClientScript.RegisterStartupScript(Me.Page.GetType(), "popupOpener",
"var popup=window.open('" + rName.ToString +
"','','width=768,height=715,resizable=yes,menubar=0,
scrollbars=yes,top=0,left=
0');popup.focus();", True)
End Sub
Private Sub GetReport(ByVal DocumentNo As String, ByVal FromDocumentDate As
String, ByVal ToDocumentDate As String, ByVal ReportType As String)


Dim sParameter(2) As String
Dim sParameterValue(2) As String
Dim NewDocumentNo() As String = DocumentNo.Split("|")
Dim NewFromDocumentDate() As String = FromDocumentDate.Split("|")
Dim NewToDocumentDate() As String = ToDocumentDate.Split("|")

DocumentNo = ""
FromDocumentDate = ""
ToDocumentDate = ""

For i = 0 To NewDocumentNo.Length
If i <> NewDocumentNo.Length Then
If NewDocumentNo.Length = 1 Then
DocumentNo = "'" & NewDocumentNo(i) & "'"
FromDocumentDate = "'" & NewFromDocumentDate(i) & "'"
ToDocumentDate = "'" & NewToDocumentDate(i) & "'"
Else
DocumentNo = DocumentNo & "'" & NewDocumentNo(i) & "'" & ","
FromDocumentDate = FromDocumentDate & "'" & NewFromDocumentDate(i) & "'" & ","
ToDocumentDate = ToDocumentDate & "'" & NewToDocumentDate(i) & "'" & ","
End If
End If
Next

If NewDocumentNo.Length > 1 Then
DocumentNo = Left(DocumentNo, DocumentNo.LastIndexOf(","))
FromDocumentDate = Left(FromDocumentDate, FromDocumentDate.LastIndexOf(","))
ToDocumentDate = Left(ToDocumentDate, ToDocumentDate.LastIndexOf(","))
End If
sParameterValue(1) = " Where C.Transaction_No <> 0 And A.Document_No IN (" & DocumentNo & ")"




Dim rName As String
Dim _Report As New rptObject
crReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument

Select Case ReportType
Case "Cheque"
rName = "rptCheque"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
'Case "ITXJournal"
' rName = "rptITXJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "ITXCashPaymemt"
' rName = "rptITXTransactionDetail"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "Journal"
' rName = "rptJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
Case Else
rName = "rptGLTransactionDetail"
'' rName = "GLReport"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("UserName", Session("UserName"), crReportDocument)
.AddParameter("CompanyName", Session("CompanyName"), crReportDocument)
.AddParameter("VoucherHeading", "Heading", crReportDocument)
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
End Select

crReportDocument.DataSourceConnections.Item(0).SetConnection("KT", "JVC", True)
If cboReportFormat.SelectedValue.Equals("pdf") Then
crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".pdf"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".pdf"))
Else
crReportDocument.ExportToDisk(ExportFormatType.Excel,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".xls"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".xls"))
End If
OpenReport("../Reports/" + rName + "." + cboReportFormat.SelectedValue)
End Sub
#End Region


Sometime report run but don't take parameter and show all record and sometime give error Missing Parameter










share|improve this question














I convert VS 2005 project to VS 2013 ,everything work fine but Crystal Report give error "Missing Parameter" all reports work fine in VS 2005 but give the same error Missing Parameter in VS 2013



Here is my Code
Dim crReportDocument As
CrystalDecisions.CrystalReports.Engine.ReportDocument
Private Sub OpenReport(ByVal rName As String)
ClientScript.RegisterStartupScript(Me.Page.GetType(), "popupOpener",
"var popup=window.open('" + rName.ToString +
"','','width=768,height=715,resizable=yes,menubar=0,
scrollbars=yes,top=0,left=
0');popup.focus();", True)
End Sub
Private Sub GetReport(ByVal DocumentNo As String, ByVal FromDocumentDate As
String, ByVal ToDocumentDate As String, ByVal ReportType As String)


Dim sParameter(2) As String
Dim sParameterValue(2) As String
Dim NewDocumentNo() As String = DocumentNo.Split("|")
Dim NewFromDocumentDate() As String = FromDocumentDate.Split("|")
Dim NewToDocumentDate() As String = ToDocumentDate.Split("|")

DocumentNo = ""
FromDocumentDate = ""
ToDocumentDate = ""

For i = 0 To NewDocumentNo.Length
If i <> NewDocumentNo.Length Then
If NewDocumentNo.Length = 1 Then
DocumentNo = "'" & NewDocumentNo(i) & "'"
FromDocumentDate = "'" & NewFromDocumentDate(i) & "'"
ToDocumentDate = "'" & NewToDocumentDate(i) & "'"
Else
DocumentNo = DocumentNo & "'" & NewDocumentNo(i) & "'" & ","
FromDocumentDate = FromDocumentDate & "'" & NewFromDocumentDate(i) & "'" & ","
ToDocumentDate = ToDocumentDate & "'" & NewToDocumentDate(i) & "'" & ","
End If
End If
Next

If NewDocumentNo.Length > 1 Then
DocumentNo = Left(DocumentNo, DocumentNo.LastIndexOf(","))
FromDocumentDate = Left(FromDocumentDate, FromDocumentDate.LastIndexOf(","))
ToDocumentDate = Left(ToDocumentDate, ToDocumentDate.LastIndexOf(","))
End If
sParameterValue(1) = " Where C.Transaction_No <> 0 And A.Document_No IN (" & DocumentNo & ")"




Dim rName As String
Dim _Report As New rptObject
crReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument

Select Case ReportType
Case "Cheque"
rName = "rptCheque"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
'Case "ITXJournal"
' rName = "rptITXJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "ITXCashPaymemt"
' rName = "rptITXTransactionDetail"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
'Case "Journal"
' rName = "rptJournalVoucher"
' crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
' With _Report
' .AddParameter("User Name", Session("UserName"), crReportDocument)
' .AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
' End With
Case Else
rName = "rptGLTransactionDetail"
'' rName = "GLReport"
crReportDocument.Load(Server.MapPath("../Reports/" + rName + ".rpt"))
With _Report
.AddParameter("UserName", Session("UserName"), crReportDocument)
.AddParameter("CompanyName", Session("CompanyName"), crReportDocument)
.AddParameter("VoucherHeading", "Heading", crReportDocument)
.AddParameter("@WhereCond", sParameterValue(1), crReportDocument)
End With
End Select

crReportDocument.DataSourceConnections.Item(0).SetConnection("KT", "JVC", True)
If cboReportFormat.SelectedValue.Equals("pdf") Then
crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".pdf"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".pdf"))
Else
crReportDocument.ExportToDisk(ExportFormatType.Excel,
System.Web.HttpContext.Current.Server.MapPath("../Reports/" + rName +
".xls"))
'Call
OpenReport(System.Web.HttpContext.Current.Server.MapPath("../Reports/" +
rName + ".xls"))
End If
OpenReport("../Reports/" + rName + "." + cboReportFormat.SelectedValue)
End Sub
#End Region


Sometime report run but don't take parameter and show all record and sometime give error Missing Parameter







vb.net visual-studio-2013 crystal-reports






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 8:30









RaheelRaheel

83




83













  • Are you using exactly the same version of Cristal Report in your new environment?

    – Siyon DP
    Jan 1 at 9:33













  • I used Version=13.0.2000.0

    – Raheel
    Jan 1 at 10:00



















  • Are you using exactly the same version of Cristal Report in your new environment?

    – Siyon DP
    Jan 1 at 9:33













  • I used Version=13.0.2000.0

    – Raheel
    Jan 1 at 10:00

















Are you using exactly the same version of Cristal Report in your new environment?

– Siyon DP
Jan 1 at 9:33







Are you using exactly the same version of Cristal Report in your new environment?

– Siyon DP
Jan 1 at 9:33















I used Version=13.0.2000.0

– Raheel
Jan 1 at 10:00





I used Version=13.0.2000.0

– Raheel
Jan 1 at 10:00












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53994062%2fcrystal-report-error-missing-parameter-when-try-to-open-in-vs-2013-but-working-f%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53994062%2fcrystal-report-error-missing-parameter-when-try-to-open-in-vs-2013-but-working-f%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules