I see that in all of your examples that you inherit DplxWebForm to create a web page. Well I cannot inherit that because we have created a custom dll for our company that I must inherit from. I tried creating a new object of DplxWebForm. but then some of the properties do not display. how do I set up my asp.net page to use ceTe.DynamicPDF.ReportWriter without inheriting it.
Inheritance
Re: Inheritance
Support · Aug 26, 2008Hello,
You can use the DocumentLayout object to load the DPLX file and that way you can inherit your page from System.Web.UI.Page class. And then use the Run method of the DocumentLayout object. You will have to make reference to the ceTe DLL file to use the DocumentLayout object which is part of the ceTe.DynamicPDF.ReportWriter namespace.
Thanks,
ceTe Software Support Team
Re: Inheritance
Forum member · Aug 26, 2008Do you have a page example of doing this
Re: Inheritance
Support · Aug 26, 2008Hello,
Following is the sample code you can use if the page is not inheriting from DplxWebForm:
DocumentLayout reportDocument = new DocumentLayout("Filepath/design.dplx");
Document document = reportDocument.Run();
document.Draw( "C:\Temp\report.pdf" )
Thanks,
ceTe Software Support Team
Re: Inheritance
Forum member · Aug 27, 2008having some problems here, first if I inherit from DplxWebForm and use the code you gave I get a nullException error on the Document = reportDocument.run() line. If I inherit from system.Web.UI.Page I can't get it to recongnize Parameters for my report. Below is the code I've Got, what do I need to do to fix it and inherit from page. As you can see I'm doing this in vb.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.ReportWriter
Partial Class FoodStampsPDF
Inherits System.Web.UI.Page
'Inherits DplxWebForm
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Parameters.Add("@SchlYr", "2009")
Parameters.Add("@StartDtTxt", "")
Parameters.Add("@EndDtTxt", "")
Parameters.Add("@AppUsrInstID", "1894")
Parameters.Add("@ReturnCnt", "1")
Parameters.Add("@ReturnTyp", "P")
Dim reportDocument As New DocumentLayout(Server.MapPath("/") & "ExamplesNet2\FandRappsPDF.aspx.dplx")
Dim doc As New Document
doc = reportDocument.Run()
doc.Draw("FoodStampsPDF.pdf")
End Sub
End Class
Re: Inheritance
Support · Aug 27, 2008Hello,
When inheriting from System.Web.UI.Page you can add the parameters as following:
Dim parameters As ParameterDictionary = New ParameterDictionary()
parameters.Add( "OrderID", 10360 )
Dim reportDocument As New DocumentLayout(Server.MapPath("/") & "ExamplesNet2\FandRappsPDF.aspx.dplx")
Dim doc As New Document
doc = reportDocument.Run(parameters)
doc.Draw("FoodStampsPDF.pdf")
Thanks,
ceTe Software Support Team
Re: Inheritance
Forum member · Aug 28, 2008Ok, I set it up as your code show and I no longer get any errors but the pdf does not display, I just get a blank page. and it is not in a pdf reader window.
Re: Inheritance
Forum member · Aug 28, 2008I just found that it did create the pdf and put in into the directory specified. So now I need to display it.
Re: Inheritance
Forum member · Aug 28, 2008I found it, I needed to use,
doc.DrawToWeb("FoodStampsPDF.pdf")
every thing is working now, thanks a lot for your help.