I've been trying to save the dynamicallly generated reports within the code, but seems that i'm missing something here
i'm kinda lost with the arguments of the SaveAs() method
-------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
cnReport2.Open()
Dim report As New CrystalReport2
DsReport2.Clear()
daReport2.SelectCommand.CommandText = "SELECT Customer.AnnualProfitRate, Customer.CustomerAccountNbr, Customer.CustomerName, Customer.FacilityAmount, Customer.FacilityPeriod, Customer.FirstDay, Customer.FirstMonth, Customer.FirstYear, Customer.FlatProfitRate, Customer.PrincipalAmount, Customer.ProfitAmount, Customer.RepaymentAmount, Repayment2.FacilityBalance, Repayment2.RepaymentAmount AS Expr1, Repayment2.RepaymentNbr FROM Customer, Repayment2"
daReport2.Fill(DsReport2, "Customer")
CrystalReportViewer1.Visible = True
CrystalReportViewer1.ReportSource = report
report.SetDataSource(DsReport2)
'i'm LOST with both arguments, either an invalid file name or file format is not defined!
' report.SaveAs(, )
cnReport2.Close()
End Sub
|