and the asp code worked, I am stuck here when trying to save the result:-)
The code below will not work and fails on the Open(), and have no idea
why:-)
var iFormat = arguments.fileFormat;
var strFileName = arguments.fileName;
var BinaryStream = CreateObject("com","ADODB.Stream");
// The Export method of PrintOutputController takes an enumerated
// value for the format and returns a ByteArray object
var o_ByteArray = arguments.o_PrintOutputController.Export(iFormat);
// WriteOutput(ToString(o_ByteArray) & '<br>');
// BinaryWrite the ByteArray property of the ByteArray object
// Create Stream object
// Specify stream type - we want To save binary data.
BinaryStream.Type = 1;
// Open the stream And write binary data To the object
BinaryStream.Open();
BinaryStream.Write(o_ByteArray.ByteArray);
// Save binary data To disk
BinaryStream.SaveToFile(strFileName, 2);
BinaryStream.Close();
Regards
Andrew Scott
Technical Consultant
NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205
Phone: 03 9686 0485 - Fax: 03 9699 7976
_____
From: Paul Hastings [mailto:[EMAIL PROTECTED]
Sent: Thursday, 27 November 2003 6:00 PM
To: CF-Talk
Subject: Re: Crystal Reports
> I am looking at connecting to crystal reports 9.0 with Coldfusion MX 6.1,
I
> am having trouble converting some ASP code across to coldfusion and would
> like some examples or resource info on the component use in CF MX 6.1.
well i'm actually researching this now (using RAS 9.2). i've not been able
to get cf to work properly with the activeX clientside, i _think_ the
component is pulling stuff from asp sessions & so never the twain shall
meet. i haven't tried porting the asp stuff to cf yet.
i have had better much luck using the java connector, rendering the reports
only took a handful of lines & i could control a whole big chunk of the
process. can also easily move this to a CFC. the only fly in the ointment
being the loss of export/print functionality in the veiwer (even though the
java viewer reports these as both being "on"). still working thru this
(fallback would be seperate export to pdf CFC)--with mx i think the java
connector might be a better choice than the COM one.
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

