You need to add the following markup in the Headĭocument.getElementById( " "). The Crosstab report is a Matrix kind of a report,allow we to view information in one column in information and in another column and then display the summary value of third column.If you dont kwon how to add. In case if anyone wondering how we can set value in a hidden field through JavaScript In this post Crystal Reports CrossTab-Report Report, we learn on how to create a CrossTab-Report using Crystal Reports in asp.net. If Me.rptDoc IsNot Nothing Then Me.rptDoc.Close() Protected Sub Page_Unload(sender As Object, e As System.EventArgs) Handles Me.Unload Me.CrystalReportViewer1.ReportSource = rptDoc Me.rptDoc.Load(Server.MapPath( "TestReport.rpt")) If Me.IsPostBack Then If Me.txtShowReport.Value = "1" Then Me.rptDoc = New () Private rptDoc As = Nothing Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load It checks that hidden field for the flag, if flag is there then it loads the report.įinally it is a good practice to dispose of the Report object in order to avoid any memory issues. Instead, when user hits Submit button, then I mark a flag in a hidden fieldĪnd then when Page_Load event handler executes, I moved the Report Load code from Submit button click handlerīut in a way that for the first time report does NOT get displayed So that when CrystalReportViewerĬontrol’s load event occurs, it should have the ReportSource property properly defined. Note that above is my hypothesis, I don’t know actually how it works.Īnyway after this I thought if my hypothesis is correct then we need to load the report ReportSource property without first loading it from ViewState, on this point it does NOT find any ReportSource that’s why it returns back this message. CrystalReportViewer control’s Load event:.created a webform and dropped a crystal viewer (CrystalReportViewer1). then, I created a crystal report (CrystalReport1.rpt) thats linked to the dataset.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |