Dear friends
I have created 3 reports in crystal report 10. when i call them individually via vb6 application they are working perfectly fine.
but when i created a 4th new format in which two of the reports are embedded as subreports they are not showing the data in 4th format when calling though vb code.
here is my code
in this report two sub reports are embedded whose data is to some extent unrelated to main report.
one more thing sub reports do have their own stored procedure.
please guide me, its better if you could tell me the line of code needed , so that i could alter it myself.
thanks in advance
shivpreet2k1
I have created 3 reports in crystal report 10. when i call them individually via vb6 application they are working perfectly fine.
but when i created a 4th new format in which two of the reports are embedded as subreports they are not showing the data in 4th format when calling though vb code.
here is my code
Code:
Dim appl As New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Dim Report As String
Set appl = New CRAXDRT.Application
Report = "\\my network path\Monthly_Sales_report_new.rpt"
Set rep = appl.OpenReport(Report)
' rep.DiscardSavedData
rep.ParameterFields.GetItemByName("@First_month_Start_date").AddCurrentValue CDate(txtFirstMonthStart.Text)
rep.ParameterFields.GetItemByName("@First_month_End_date").AddCurrentValue CDate(txtFirstMonthEnd.Text)
rep.ParameterFields.GetItemByName("@Second_month_Start_date").AddCurrentValue CDate(txtSecondMonthStart.Text)
rep.ParameterFields.GetItemByName("@Second_month_End_date").AddCurrentValue CDate(txtSecondMonthEnd.Text)
rep.ParameterFields.GetItemByName("@Year_Start_date").AddCurrentValue CDate(txtYearStart.Text)
rep.ParameterFields.GetItemByName("@Year_End_date").AddCurrentValue CDate(txtYearEnd.Text)
rep.ParameterFields.GetItemByName("@month_second_caption").AddCurrentValue CStr(txtSecondMonthCaption.Text)
rep.ParameterFields.GetItemByName("@month_first_caption").AddCurrentValue CStr(txtFirstMonthCaption.Text)
rep.ParameterFields.GetItemByName("@total_prev_caption").AddCurrentValue txtPrevTotalCaption.Text
rep.ParameterFields.GetItemByName("@Total_current_caption").AddCurrentValue txtCurrentTotalCaption.Text
rep.EnableParameterPrompting = False
Dim eachtable As CRAXDRT.DatabaseTable
For Each eachtable In rep.Database.Tables
eachtable.ConnectionProperties("user id") = "myuser"
eachtable.ConnectionProperties("password") = "mypassword"
Next
one more thing sub reports do have their own stored procedure.
please guide me, its better if you could tell me the line of code needed , so that i could alter it myself.
thanks in advance
shivpreet2k1