Alaska Software Inc. - Crystal reporting
Username: Password:
AuthorTopic: Crystal reporting
Allen LeeCrystal reporting
on Mon, 20 Dec 2004 11:50:39 -0800
Hi All;
At present, I use 2 approaches to supply reports that our web app users can
print.
1.  A hardcoded HTML file
2.  A call to the R&R Relational Report Writer runtime executable with
passed parameters.

The problem:
1.  Handcoding new HTML reports is to time-consuming.
2.  R&R only prints properly in 10cpi Courier and doesn't write reliable
HTML.

So I bought Crystal Reports Ver10.
Nowhere in the extensive documentation do I see how to incorporate it with
WAA.
Has anyone used Crystal Reports?  If so, how are you using it?
What are you other developers using to allow the users to print reports from
your web app?

Regards Allen Lee
Phil Ide
Re: Crystal reporting
on Tue, 21 Dec 2004 10:30:12 +0000
Allen,

> The problem:
> 1.  Handcoding new HTML reports is to time-consuming.
> 2.  R&R only prints properly in 10cpi Courier and doesn't write reliable
> HTML.

I use three approaches.

1. Hand-coded HTML
Using XbHAL this is fairly trivial, depending upon the complexity of the
report.  Most reports tend to be reasonable simple.  One great thing about
XbHAL is that I can create different parts of the report at the same time
(e.g. I can add several sections relating to different items, and as I add
each item I can put a link to the item in an index at the top of the page).

2. Hand-coded PDF's
Actually, since I use a PDF printer driver, this is as simple as using the
gra*() functions to print to a presentation space associated with the
printer.  However, since the document is generated entirely by code, a
report can take several days to write.

3. RTF templates
I create an RTF or MS-Word DOC, and insert tokens.  I then memoread() the
document and StrTran() the tokens to replace with the data.  Alternatively,
I use my Document Tag Processor (#28 on my site) which allows me to place
macros in the document.  These can refer to UDF's, Aliased fields or
anything else available at runtime.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Gotta run, the cat's caught in the printer.
Phil Ide
Re: Crystal reporting
on Tue, 21 Dec 2004 12:09:49 +0000
Allen,

> 3. RTF templates
> I create an RTF or MS-Word DOC, and insert tokens.  I then memoread() the
> document and StrTran() the tokens to replace with the data.  Alternatively,
> I use my Document Tag Processor (#28 on my site) which allows me to place
> macros in the document.  These can refer to UDF's, Aliased fields or
> anything else available at runtime.

I forgot to say that after processing the document to add the data, I then
call WinAPIPrint(cFile) from my PrinterAPI package (#26 on my site) to toss
the document at Windows, which then calls MS-Word to print it.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Archaeologist: A man whose career lies in ruins
Allen LeeRe: Crystal reporting
on Tue, 21 Dec 2004 10:54:15 -0800
To Phil;
I like the sound of your approach #3 - the RTF template.
I'm going to look at #26 and #28 from your site.
Thank you.
Les C. Cseh (ASAP Checks)Phil Ide's PrinterAPI package
on Wed, 25 Feb 2009 09:33:11 -0500
I just noticed a reference to Phil Ide's winapiprint() from his PrinterAPI
package, but sadly that site is no longer there.

Does anyone have this package?

Les

"Phil Ide" <phil@idep.org.uk> wrote in message 
news:iw0c0005yai5.dlg@idep.org.uk...
>
> I forgot to say that after processing the document to add the data, I then
> call WinAPIPrint(cFile) from my PrinterAPI package (#26 on my site) to 
> toss
> the document at Windows, which then calls MS-Word to print it.
>
> Regards,
> -- 
> Phil Ide
>
> ***************************************
> * Xbase++ FAQ, Libraries and Sources: *
> * goto: http://www.idep.org.uk/xbase  *
> ***************************************
>
> Archaeologist: A man whose career lies in ruins
MichaelRe: Phil Ide's PrinterAPI package
on Fri, 27 Feb 2009 05:41:25 -0600
You can find it here:
http://www.xbaseprogrammer.com/PhilIde.cgi

HTH,
Michael


"Les C. Cseh (ASAP Checks)" <les.cseh@asapchecks.com> wrote in message 
news:6890f24b$473ce0cd$16ce@news.alaska-software.com...
>I just noticed a reference to Phil Ide's winapiprint() from his PrinterAPI
> package, but sadly that site is no longer there.
>
> Does anyone have this package?
>
> Les
>
> "Phil Ide" <phil@idep.org.uk> wrote in message 
> news:iw0c0005yai5.dlg@idep.org.uk...
>>
>> I forgot to say that after processing the document to add the data, I 
>> then
>> call WinAPIPrint(cFile) from my PrinterAPI package (#26 on my site) to 
>> toss
>> the document at Windows, which then calls MS-Word to print it.
>>
>> Regards,
>> -- 
>> Phil Ide
>>
>> ***************************************
>> * Xbase++ FAQ, Libraries and Sources: *
>> * goto: http://www.idep.org.uk/xbase  *
>> ***************************************
>>
>> Archaeologist: A man whose career lies in ruins
>
>
Les C. Cseh (ASAP Checks)Re: Phil Ide's PrinterAPI package
on Sun, 01 Mar 2009 10:26:11 -0500
thank you, michael.

lcc.

"Michael" <Michael@NECUnified.com> wrote in message 
news:7f52ab00$260d9498$1ee18@news.alaska-software.com...
> You can find it here:
> http://www.xbaseprogrammer.com/PhilIde.cgi
>
> HTH,
> Michael
>
>
> "Les C. Cseh (ASAP Checks)" <les.cseh@asapchecks.com> wrote in message 
> news:6890f24b$473ce0cd$16ce@news.alaska-software.com...
>>I just noticed a reference to Phil Ide's winapiprint() from his PrinterAPI
>> package, but sadly that site is no longer there.
>>
>> Does anyone have this package?
>>
>> Les
>>
>> "Phil Ide" <phil@idep.org.uk> wrote in message 
>> news:iw0c0005yai5.dlg@idep.org.uk...
>>>
>>> I forgot to say that after processing the document to add the data, I 
>>> then
>>> call WinAPIPrint(cFile) from my PrinterAPI package (#26 on my site) to 
>>> toss
>>> the document at Windows, which then calls MS-Word to print it.
>>>
>>> Regards,
>>> -- 
>>> Phil Ide
>>>
>>> ***************************************
>>> * Xbase++ FAQ, Libraries and Sources: *
>>> * goto: http://www.idep.org.uk/xbase  *
>>> ***************************************
>>>
>>> Archaeologist: A man whose career lies in ruins
>>
>>
>
>
erikRe: Crystal reporting
on Tue, 21 Dec 2004 08:12:32 -0500
I use crystal reports to generate the report, print it to a pdf print driver
to create the document.  This works with waa & xb2.net.

Erik


"Allen Lee" <alee@infoprosys.net> wrote in message
news:OZx6Pzs5EHA.6272@S15147418...
> Hi All;
> At present, I use 2 approaches to supply reports that our web app users
can
> print.
> 1.  A hardcoded HTML file
> 2.  A call to the R&R Relational Report Writer runtime executable with
> passed parameters.
>
> The problem:
> 1.  Handcoding new HTML reports is to time-consuming.
> 2.  R&R only prints properly in 10cpi Courier and doesn't write reliable
> HTML.
>
> So I bought Crystal Reports Ver10.
> Nowhere in the extensive documentation do I see how to incorporate it with
> WAA.
> Has anyone used Crystal Reports?  If so, how are you using it?
> What are you other developers using to allow the users to print reports
from
> your web app?
>
> Regards Allen Lee
>
>
Allen LeeRe: Crystal reporting
on Tue, 21 Dec 2004 10:57:30 -0800
Question for Erik:
Suppose that I have created a Crystal file called Sample.RPT.
Just to get me started, could you show me some source code to print it?
Thank you.
erikRe: Crystal reporting
on Wed, 22 Dec 2004 11:45:15 -0500
You have to use jazzage to connect to the crw ocx like this:

 oCrystalReport:= CrystalReport():new()

oCrystalReport:Connect(JAXPPCREATECONTROL(ROOTWINDOW():drawingArea:getHWND()
,"CrystalReport1",8,8,8,8,cCode,0))

then to actually print the report:

      oCrystalReport:ReportFileName:=::cFile
      oCrystalReport:PutWindowTitle(::cTitle)
      IF AT("{",::cQuery)>0
         oCrystalReport:PutSelectionFormula(::cQuery)
      ELSE
         oCrystalReport:PutSelectionFormula("")
      ENDIF
      oCrystalReport:Destination := crptToPrinter
      oCrystalReport:Action = 1

Without jazzage you could use cockpit or maybe xbpocx.

Let me know if you need more help.









"Allen Lee" <alee@infoprosys.net> wrote in message
news:zg4lH645EHA.1932@S15147418...
> Question for Erik:
> Suppose that I have created a Crystal file called Sample.RPT.
> Just to get me started, could you show me some source code to print it?
> Thank you.
>
>
Allen LeeRe: Crystal reporting
on Sun, 26 Dec 2004 20:00:26 -0800
I have Cockpit but not Jazzage.
Does anyone know how to connect to Crystal Reports' OCX with Cockpit?
Is it true that WAA 1.9 will have OCX connectivity built in?
Vladimir IahnencoRe: Crystal reporting
on Mon, 27 Dec 2004 12:55:00 -0500
Allen,
If ActiveX available with 1.9 you definitely will be able to connect it to
one of waa forms. Right now you may try to use XbpOcx to create your object,
and you will have just to change inheritance with 1.9.  Check Active methods
you have to use, XbpOcx will not work with interface methods and doesn't
like ValType Variant in method parameters. But try first with an application
with activeX object created in the main thread, if you run it in threads,
you will have to initialize Windows COM subsystem, XbpOcx goodies contain
PROCEDURE xbpOcxThreadInstall()

--
Regards,

Vladimir


"Allen Lee" <alee@infoprosys.net> wrote in message
news:3niKdf86EHA.6512@S15147418...
> I have Cockpit but not Jazzage.
> Does anyone know how to connect to Crystal Reports' OCX with Cockpit?
> Is it true that WAA 1.9 will have OCX connectivity built in?
>
>
Allen LeeRe: Crystal reporting
on Mon, 27 Dec 2004 12:01:16 -0800
I cannot find XbpOcx anywhere.
What is it's extension?
That is why I'm trying to use Cockpit.
Can I make a dll from a modified AutomationObject.prg and Cockpit.lib to
load into WAA?
Will that work?
Has anyone used Cockpit with WAA?
After this quest is finished, I would like to post simple instructions for
anyone to follow to interface Crystal Reports.
Vladimir IahnencoRe: Crystal reporting
on Tue, 28 Dec 2004 02:17:40 -0500
Allen,
XbpOcx is a part of the Professional Subscription. It is as a zip with prg's
& dll's. To work with waa likely you will need only xocmain.dll
You can also create a wrapper dll in c++ to convert com method calls to
DllCall(_myDLL,.....), I can send you an example.
--
Regards,

Vladimir


"Allen Lee" <alee@infoprosys.net> wrote in message
news:61kw#5E7EHA.6380@S15147418...
> I cannot find XbpOcx anywhere.
> What is it's extension?
> That is why I'm trying to use Cockpit.
> Can I make a dll from a modified AutomationObject.prg and Cockpit.lib to
> load into WAA?
> Will that work?
> Has anyone used Cockpit with WAA?
> After this quest is finished, I would like to post simple instructions for
> anyone to follow to interface Crystal Reports.
>
>
Allen LeeRe: Crystal reporting
on Wed, 29 Dec 2004 13:57:21 -0800
I do not use C++.
Connecting the Crystal Reports viewer should not be as difficult as I am
finding to be.
Maybe, I should wait until WAA 1.9.
So no one else uses Crystal Reports ???