{"id":884,"date":"2008-07-07T23:30:09","date_gmt":"2008-07-08T06:30:09","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/books\/?p=884"},"modified":"2010-11-17T18:54:22","modified_gmt":"2010-11-18T01:54:22","slug":"1-3-aspnet-preview","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/1-3-aspnet-preview\/","title":{"rendered":"1.03 ASP.NET Preview"},"content":{"rendered":"<h1>Previewing with ASP.NET<\/h1>\n<p>Previewing a report with ASP.NET requires adding a CrystalReportViewer control to the web page and attaching it to a CrystalReportSource control. Create a new web project and open the default web page in design mode. Add a CrystalReportViewer control to it. The viewer is located in the Reporting tab near the end of the Toolbox. Once you add it to the form you will see a medium sized rectangle on the web page.<\/p>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image015.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image016.jpg\"><\/img><\/a><br \/>\n         <b>Figure 1-8. The ASP.NET report viewer control.<\/b><\/p>\n<p>Notice that the web viewer control looks totally different than the Windows viewer control. The web viewer is simply a placeholder for where the report will be displayed.<\/p>\n<p>Click on the viewer control and notice that it has a small arrow in the top right corner. Click on this to open a list of smart tasks. This is shown in Figure 1-8.<\/p>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image017.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image018.jpg\"><\/img><\/a><br \/>\n         <b>Figure 1-9. The ReportDocument dialog box.<\/b><\/p>\n<p>Click the drop-down box for Choose Report Source and select <new report source>. This opens the Create Report Source dialog box. It lets you specify a name for the report source and pick the report to use. Click the botton drop-down box and choose the CrystalReport.rpt report.<\/p>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image019.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image020.jpg\"><\/img><\/a><\/p>\n<p>Click the OK button to create the report source control and link it to the viewer control. This automatically previews the report in design mode of your ASP.NET application.<\/p>\n<p>Run the web application and you&#8217;ll see the Employee List report automatically previewed when the page opens.<\/p>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image021.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRNet2008\/Ch01\/image022.jpg\"><\/img><\/a><br \/>\n         <b>Figure 1-10. The Employee List report shown in an ASP.NET application.<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previewing with ASP.NET Previewing a report with ASP.NET requires adding a CrystalReportViewer control to the web page and attaching it to a CrystalReportSource control. Create a new web project and open the default web page in design mode. Add a CrystalReportViewer control to it. The viewer is located in the Reporting tab near the end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,40],"tags":[],"class_list":["post-884","post","type-post","status-publish","format-standard","hentry","category-chapter-1-crystal-reports-intro","category-crystal-reportsnet-2008","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":1,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"predecessor-version":[{"id":1673,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/884\/revisions\/1673"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}