Not sure how you would get the binary stream from the crystal report,
but it's failry trivial to save byteArrays to files with java.

-----Original Message-----
From: Andrew Scott [mailto:[EMAIL PROTECTED]
Sent: 27 November 2003 20:25
To: CF-Talk
Subject: How do you save binary


I have been trying to use ADODB.stream to save binary from a
crystal report,
with no luck.


When I get to this bit of code it crashes.


BinaryStream.Open() I can't work it out. For those interested
here is the
whole code, is there other methods that I could use.


Btw the code works in ASP just not coldfusion.

  var iFormat = arguments.fileFormat;
  var strFileName = arguments.fileName;
  var BinaryStream = CreateObject("com","ADODB.Stream");
   var o_ByteArray =
arguments.o_PrintOutputController.Export(iFormat);

  BinaryStream.Type = 1;
  BinaryStream.Open();

  BinaryStream.Write(o_ByteArray.ByteArray);
    BinaryStream.SaveToFile(strFileName, 2);
  BinaryStream.Close();


  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to