Protected Sub OfficeExecute_Click()
If page.isvalid=True then
LoadReportData()
Dim crystalReport as new reportDocument()
crystalreport.load((Server.mappath("~/Reports/FollowUp.rpt"))
'The Place where the crystalreport.setdatasource(...) statement should located
CrystalReportViewer1.ReportSource=crystalreport
Response.redirect(httpcontext.current.request.url.tostring(),True)
endif
End Sub
1. The underlying table which the crystal report use is "FollowUpReportSource"
2. I have a "~\App_Code\FollowUpDataSet.xsd" dataset which consists of only the table FollowUpReportSource.
3. The Fill query used to fill the FollowUpDataSet.xsd, is using parameter @UN (nvarchar(50) as following
Member
56 Points
657 Posts
Please help me how to use the dataset accuratelty to perform the crystalreport.setdatasource
Jan 27, 2015 02:36 AM|alihusain_77|LINK
I have the following vb.net code
1. The underlying table which the crystal report use is "FollowUpReportSource"
2. I have a "~\App_Code\FollowUpDataSet.xsd" dataset which consists of only the table FollowUpReportSource.
3. The Fill query used to fill the FollowUpDataSet.xsd, is using parameter @UN (nvarchar(50) as following
4. The value should passed to @UN = session("username")
5. my connection string already defined as myconnection.
According to the above, How to prepare the dataset and then use it in the CrystalReport.SetDataSource(...) ?
All-Star
19919 Points
2016 Posts
Re: Please help me how to use the dataset accuratelty to perform the crystalreport.setdatasource
Jan 30, 2015 01:35 AM|Eileen ni - MSFT|LINK
Hi alihusain_77,
Thanks for your post.
Here are some samples:
#Crystal Report Dynamic DataSource: Crystal Report without Database connection in ASP.Net using C# and VB.Net
http://www.aspsnippets.com/Articles/Crystal-Report-Dynamic-DataSource-Crystal-Report-without-Database-connection-in-ASPNet-using-C-and-VBNet.aspx
#Crystal Report Dynamic DataSource: Crystal Report without Database connection in ASP.Net using C# and VB.Net
http://www.aspsnippets.com/Articles/Generate-Crystal-Reports-using-Strongly-Typed-DataSet-in-ASPNet-using-C-and-VBNet.aspx
Hope this can be helpful.
Best Regards,
Eileen