Trying to create a pdf from an rpt. I used the wizard wich generated the code within the div tags. I authored the code inside the <%%> tags. I am following an article written by Edward Tanguay-How to create PDF files from ASP.NET pages. Can I refer to the Crystal Report filename outside the div code-block and refer to those elements inside my <%-block. Here is the code
<%@ Register TagPrefix="CR" Namespace="CrystalDecisions.Web" Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" %><%
@ Import Namespace ="CrystalDecisions.CrystalReports.Engine" %><%@ Import Namespace="CrystalDecisions.Shared" %>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> size="1" color="#0000ff"> < html xmlns =" http://www.w3.org/1999/xhtml" size="1"> ><head runat="server">
< title > Test Report title> head><body>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" Runat="server" AutoDataBind="True"
Height="947px" ReportSourceID="CrystalReportSource1" Width="845px" BackColor="Beige"/>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport1.rpt">
Report>
CR:CrystalReportSource>div>
<%
Dim myDoc As ReportDocument = New ReportDocumentDim ExpOpt As ExportOptions = myDoc.ExportOptionsmyDoc.Load(
"CrystalReport1.rpt")ExpOpt.ExportFormatType = ExportFormatType.PortableDocFormat
ExpOpt.ExportDestinationType = ExportDestinationType.DiskFile
myDoc.Export()
%>
form>
<button title="Click Me">Do me again<img src="icon-adobe-acrobat.gif" alt="WoW" /> button> body>html>