p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Problem exporting to DHTML


Message #1 by "S Gatt" <sgatt99@h...> on Mon, 5 Nov 2001 17:54:02
Hi,



I have a VB6 app using Crystal Reports (.ocx) as the reporting tool and 

need to export my reports to a website for easy distribution.  In the 

absence of a constant for HTML4 with the .ocx, is there a work around for 

exporting to this format (the report format gets all jumbled using 

HTML32)??  I have tried using an API solution (below) recommended on 

CrystalDecisions.  It does work for html32 constants but again, no luck 

with dhtml.  Any tips wld be appreciated on the above (or even any on how 

to cure the formatting loss if I am stuck with html32).



Cheers



S



Global Const crUXFHTML4Type = 3    ' contained in wrapper module



' Declare print job variables

Dim Result As Integer ' used for error checking

Dim MainJob As Integer



' Declare HTML type exporting variable

Dim htmlType As Integer



' Open the Crystal Print Engine

Result = PEOpenEngine()



' Open a report (or print job). Set the job id to MainJob.

' You will need to modify the argument according to the

' path to your source RPT file

MainJob = PEOpenPrintJob(RAPIDrep & "MISbookage.rpt" & vbNullChar)



' Set the HTML type according to the constants specified in crwrap.bas

htmlType = crUXFHTML4Type



' Set the HTML exporting using crPEExportToHTML.

' You will need to modify the 3rd argument according to where you want

' to write the exported file.

                 

Result = crPEExportToHTML(MainJob, htmlType, "V:\test\htmlsample.htm" & 

vbNullChar)

                 

                 

' Start the print job (commences exporting)

Result = PEStartPrintJob(MainJob, 1)



' Close the print job

PEClosePrintJob (MainJob)



' Close the Crystal Print Engine

PECloseEngine

Message #2 by "Balsu" <bkaup@o...> on Tue, 6 Nov 2001 11:57:44 +0530
If you are using  Crystal Rpt 7 and above there wouldn't be any problem

exporting to HTML4(DHTML)  i suppose.

Infact this I've tried it myself lotsa times.

why not give a try  ??



regards,

----------  ***   ----------

--Balasubramanya K



  Omnesys Technologies Pvt.Ltd

   Voice : 8521464 - 68 Extn :16

   mailto: bkaup@o...

               bkaup@o...



-----Original Message-----

From: S Gatt <sgatt99@h...>

To: crystal_reports <crystal_reports@p...>

Date: Tuesday, November 06, 2001 12:04 AM

Subject: [crystal_reports] Problem exporting to DHTML





>Hi,

>

>I have a VB6 app using Crystal Reports (.ocx) as the reporting tool and

>need to export my reports to a website for easy distribution.  In the

>absence of a constant for HTML4 with the .ocx, is there a work around for

>exporting to this format (the report format gets all jumbled using

>HTML32)??  I have tried using an API solution (below) recommended on

>CrystalDecisions.  It does work for html32 constants but again, no luck

>with dhtml.  Any tips wld be appreciated on the above (or even any on how

>to cure the formatting loss if I am stuck with html32).

>

>Cheers

>

>S

>

>Global Const crUXFHTML4Type = 3    ' contained in wrapper module

>

>' Declare print job variables

>Dim Result As Integer ' used for error checking

>Dim MainJob As Integer

>

>' Declare HTML type exporting variable

>Dim htmlType As Integer

>

>' Open the Crystal Print Engine

>Result = PEOpenEngine()

>

>' Open a report (or print job). Set the job id to MainJob.

>' You will need to modify the argument according to the

>' path to your source RPT file

>MainJob = PEOpenPrintJob(RAPIDrep & "MISbookage.rpt" & vbNullChar)

>

>' Set the HTML type according to the constants specified in crwrap.bas

>htmlType = crUXFHTML4Type

>

>' Set the HTML exporting using crPEExportToHTML.

>' You will need to modify the 3rd argument according to where you want

>' to write the exported file.

>

>Result = crPEExportToHTML(MainJob, htmlType, "V:\test\htmlsample.htm" &

>vbNullChar)

>

>

>' Start the print job (commences exporting)

>Result = PEStartPrintJob(MainJob, 1)

>

>' Close the print job

>PEClosePrintJob (MainJob)

>

>' Close the Crystal Print Engine

>PECloseEngine

>




$subst('Email.Unsub')

>





Message #3 by "S Gatt" <sgatt99@h...> on Tue, 6 Nov 2001 09:40:14
I'm using CR v8.  Seagate reckon exporting to DHTML using the .ocx is not 

possible/supported.  Have you done this in VB using the .ocx or API?  I've 

tried exporting to DHTML file using  both methods with no success - so if 

you have any code examples it would be a great help.



simon







> If you are using  Crystal Rpt 7 and above there wouldn't be any problem

> exporting to HTML4(DHTML)  i suppose.

> Infact this I've tried it myself lotsa times.

> why not give a try  ??

> 

> regards,

> ----------  ***   ----------

> --Balasubramanya K

> 

>   Omnesys Technologies Pvt.Ltd

>    Voice : 8521464 - 68 Extn :16

>    mailto: bkaup@o...

>                bkaup@o...

> 

> -----Original Message-----

> From: S Gatt <sgatt99@h...>

> To: crystal_reports <crystal_reports@p...>

> Date: Tuesday, November 06, 2001 12:04 AM

> Subject: [crystal_reports] Problem exporting to DHTML

> 

> 

> >Hi,

> >

> >I have a VB6 app using Crystal Reports (.ocx) as the reporting tool and

> >need to export my reports to a website for easy distribution.  In the

> >absence of a constant for HTML4 with the .ocx, is there a work around 

for

> >exporting to this format (the report format gets all jumbled using

> >HTML32)??  I have tried using an API solution (below) recommended on

> >CrystalDecisions.  It does work for html32 constants but again, no luck

> >with dhtml.  Any tips wld be appreciated on the above (or even any on 

how

> >to cure the formatting loss if I am stuck with html32).

> >

> >Cheers

> >

> >S

> >

> >Global Const crUXFHTML4Type = 3    ' contained in wrapper module

> >

> >' Declare print job variables

> >Dim Result As Integer ' used for error checking

> >Dim MainJob As Integer

> >

> >' Declare HTML type exporting variable

> >Dim htmlType As Integer

> >

> >' Open the Crystal Print Engine

> >Result = PEOpenEngine()

> >

> >' Open a report (or print job). Set the job id to MainJob.

> >' You will need to modify the argument according to the

> >' path to your source RPT file

> >MainJob = PEOpenPrintJob(RAPIDrep & "MISbookage.rpt" & vbNullChar)

> >

> >' Set the HTML type according to the constants specified in crwrap.bas

> >htmlType = crUXFHTML4Type

> >

> >' Set the HTML exporting using crPEExportToHTML.

> >' You will need to modify the 3rd argument according to where you want

> >' to write the exported file.

> >

> >Result = crPEExportToHTML(MainJob, htmlType, "V:\test\htmlsample.htm" &

> >vbNullChar)

> >

> >

> >' Start the print job (commences exporting)

> >Result = PEStartPrintJob(MainJob, 1)

> >

> >' Close the print job

> >PEClosePrintJob (MainJob)

> >

> >' Close the Crystal Print Engine

> >PECloseEngine

> >



bkaup@o...


> $subst('Email.Unsub')

> >

> 

> 


  Return to Index