-
newsgroup_archive said 8 years, 1 month ago:
I think better way is to use C1PDF control for the purpose.
Also the code should not work as it will give object reference error."Herve" wrote in message
news:42524c89$1@vger5.componentone.com…
>
> Hi,
>
> I want to generate a PDF file by clicking in a button but without having a
C1WebReport control in my Page.
>
> I use the following code :
>
> Private C1WebReport1 As New C1.Web.C1WebReport.C1WebReport
>
> C1WebReport1.Report.Load("Report", "report.xml")
> C1WebReport1.Report.DataSource.Recordset = DataSetSource.Tables(0)
> C1WebReport1.DataBind()
> C1WebReport1.ShowPDF()
>
> Where "report.xml" has been generated by the Report Designer.
>
> But I got an error with ShowPDF() function…
> Any idea ?
>
>Click here to view the original newsgroup article (read only).
| # -
newsgroup_archive said 8 years, 1 month ago:
Hi,
I want to generate a PDF file by clicking in a button but without having a C1WebReport control in my Page.
I use the following code :
Private C1WebReport1 As New C1.Web.C1WebReport.C1WebReport
C1WebReport1.Report.Load("Report", "report.xml")
C1WebReport1.Report.DataSource.Recordset = DataSetSource.Tables(0)
C1WebReport1.DataBind()
C1WebReport1.ShowPDF()Where "report.xml" has been generated by the Report Designer.
But I got an error with ShowPDF() function…
Any idea ?Click here to view the original newsgroup article (read only).
| # -
newsgroup_archive said 8 years, 1 month ago:
Hi Herve
This can't work because the ShowPDF method writes the pdf stream right into
the page (no temp files). But the control you created is not on the page…The easiest way to do this would be to create the control at design time and
put it on the page as usual, then make it invisible.> I want to generate a PDF file by clicking in a button but without having a
> C1WebReport control in my Page.
>
> I use the following code :
>
> Private C1WebReport1 As New C1.Web.C1WebReport.C1WebReport
>
> C1WebReport1.Report.Load("Report", "report.xml")
> C1WebReport1.Report.DataSource.Recordset = DataSetSource.Tables(0)
> C1WebReport1.DataBind()
> C1WebReport1.ShowPDF()
>
> Where "report.xml" has been generated by the Report Designer.
>
> But I got an error with ShowPDF() function…
> Any idea ?
>
>Click here to view the original newsgroup article (read only).
| # -
newsgroup_archive said 8 years, 1 month ago:
Thks very much !
Herve"Bernardo de Castilho" wrote:
>Hi Herve
>
>This can't work because the ShowPDF method writes the pdf stream right into
>the page (no temp files). But the control you created is not on the page…
>
>The easiest way to do this would be to create the control at design time and
>put it on the page as usual, then make it invisible.
>
>
>> I want to generate a PDF file by clicking in a button but without having a
>> C1WebReport control in my Page.
>>
>> I use the following code :
>>
>> Private C1WebReport1 As New C1.Web.C1WebReport.C1WebReport
>>
>> C1WebReport1.Report.Load("Report", "report.xml")
>> C1WebReport1.Report.DataSource.Recordset = DataSetSource.Tables(0)
>> C1WebReport1.DataBind()
>> C1WebReport1.ShowPDF()
>>
>> Where "report.xml" has been generated by the Report Designer.
>>
>> But I got an error with ShowPDF() function…
>> Any idea ?
>>
>>
>
>Click here to view the original newsgroup article (read only).
| #
You must be logged in to reply to this topic.

