Board index » delphi » Tip: How to put a Crystal Reports preview-window on the Window pulldown

Tip: How to put a Crystal Reports preview-window on the Window pulldown

Here's something that I didn't know how to do, and having found out how to do
it I thought I'd spare the rest of you the trouble.  :-)

Most of us use Crystal Reports at least now-and-then because it's a good
report generator that can do more than the "stock" report-generators we may
have on hand.  It is relatively straightforward, when using this product, to
present a report in a preview-window that is an MDI child.

But how do you get the newly-created preview window to show up on the Window
pulldown of the parent?  Oddly enough, Crystal Reports Pro 6.0 (at least) does
not do this for you.  But you can accomplish this with a single Windows API
call:

        SendMessage(Application.MainForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0);

{This is Delphi ... you would use different declarations in Paradox ObjectPAL
to invoke the API-call or to obtain the Windows handle of the parent window.}

This message, which interestingly enough is addressed to the parent window and
does not identify the child-window in any way, will cause the parent to
reconstruct its child-window menu list.

Also interestingly, I found that the menu-entry (correctly) disappeared on its
own when the preview window was closed.  It simply took a nudge to get it to
appear... not to make it disappear on-cue.

 

Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Quote
In article <34FE3F68.7BB34...@gis.net> Ernest Brackett <ebs...@gis.net> writes:
>Sorry to ask an unrelated question but from your post it appears you have alot of
>experience with Crystal Reports 6.0 Pro.  I have been fooling around with  6.0 Pro
>and I have a problem with the following:
>Using Delphi 3.02, Crystal Reports Pro 6.0 and the VCL (6VCLDL3B).
>The WidowTitle property sets the Crystal Reports Preview window caption correctly.
>My problem is that when I click the PRINT button from Crystal Reports Preview window
>my printer's (Canon BJ-610) dialog screen comes up with a window that gives the
>curent status of the print job including what's printing, how long it going to take
>etc;.
>In this window lies the problem in that it reads: Printing - Seagate Crystal Reports
>-ChemIndex.rpt .
>I want it to say: Printing - HazLabeler - MSDS Index By Chemicals Report.
>Where is it picking up the "Seagate Crystal Reports" text from? Can this be modified
>some way?

Can't give you an answer to that one -- sorry.  I wouldn't assume that Crystal
is the one providing that job-title, but I actually don't know where it does
come from.

Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Hi,

Sorry to ask an unrelated question but from your post it appears you have alot of
experience with Crystal Reports 6.0 Pro.  I have been fooling around with  6.0 Pro
and I have a problem with the following:

Using Delphi 3.02, Crystal Reports Pro 6.0 and the VCL (6VCLDL3B).

The WidowTitle property sets the Crystal Reports Preview window caption correctly.
My problem is that when I click the PRINT button from Crystal Reports Preview window
my printer's (Canon BJ-610) dialog screen comes up with a window that gives the
curent status of the print job including what's printing, how long it going to take
etc;.

In this window lies the problem in that it reads: Printing - Seagate Crystal Reports
-ChemIndex.rpt .

I want it to say: Printing - HazLabeler - MSDS Index By Chemicals Report.

Where is it picking up the "Seagate Crystal Reports" text from? Can this be modified
some way?

Here is a sample of code I use to set a couple of the properties of the Delphi VCL
(CRPE)

procedure TPreviewReportListForm.PreviewSpeedButtonClick(Sender: TObject);
begin
if ReportsRadioGroup.ItemIndex = 0 then
   begin
   ExtractFilePath(Application.ExeName)+'HzReport\ChemIndex.RPT';
   PreviewListingCRPE.WindowTitle :='HazLabeler - MSDS Index By Chemicals Report';
   PreviewListingCRPE.ReportName := 'ChemIndex.rpt';
   PreviewListingCRPE.ReportTitle := 'MSDS Index By Chemical Name';
   PreviewListingCRPE.WindowShowGroupTree := True;
   PreviewListingCRPE.Execute;
end;

Thank you,
Ernest Brackett

Quote
Sundial Services wrote:
> Here's something that I didn't know how to do, and having found out how to do
> it I thought I'd spare the rest of you the trouble.  :-)

> Most of us use Crystal Reports at least now-and-then because it's a good
> report generator that can do more than the "stock" report-generators we may
> have on hand.  It is relatively straightforward, when using this product, to
> present a report in a preview-window that is an MDI child.

> But how do you get the newly-created preview window to show up on the Window
> pulldown of the parent?  Oddly enough, Crystal Reports Pro 6.0 (at least) does
> not do this for you.  But you can accomplish this with a single Windows API
> call:

>         SendMessage(Application.MainForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0);

> {This is Delphi ... you would use different declarations in Paradox ObjectPAL
> to invoke the API-call or to obtain the Windows handle of the parent window.}

> This message, which interestingly enough is addressed to the parent window and
> does not identify the child-window in any way, will cause the parent to
> reconstruct its child-window menu list.

> Also interestingly, I found that the menu-entry (correctly) disappeared on its
> own when the preview window was closed.  It simply took a nudge to get it to
> appear... not to make it disappear on-cue.

Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Thank you for the tip,  I'll keep it with my Crystal 6 manuals.

I've found Crystal reports very easy to use from the days of Borlands Object
Vision which had an
early version, then recently after struggling with reportsmith on Delphi 1.
Crystal 4.5 came fee on
a Brittish magazine CD - I used that to great advantage and ease (compared
to report smith)
and just recently purchased Crystal 6.

I've used the export to HTML with success - but would like to have a bit
more functionality
for example I have URL in my database and I would like the finished web page
to show the URLs as links.
any suggestions?

Thanks again for the tip.

Quote
Sundial Services wrote in message ...

>Here's something that I didn't know how to do, and having found out how to
do
>it I thought I'd spare the rest of you the trouble.  :-)

>Most of us use Crystal Reports at least now-and-then because it's a good
>report generator that can do more than the "stock" report-generators we may
>have on hand.  It is relatively straightforward, when using this product,
to
>present a report in a preview-window that is an MDI child.

>But how do you get the newly-created preview window to show up on the
Window
>pulldown of the parent?  Oddly enough, Crystal Reports Pro 6.0 (at least)
does
>not do this for you.  But you can accomplish this with a single Windows API
>call:

> SendMessage(Application.MainForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0);

>{This is Delphi ... you would use different declarations in Paradox
ObjectPAL
>to invoke the API-call or to obtain the Windows handle of the parent
window.}

>This message, which interestingly enough is addressed to the parent window
and
>does not identify the child-window in any way, will cause the parent to
>reconstruct its child-window menu list.

>Also interestingly, I found that the menu-entry (correctly) disappeared on
its
>own when the preview window was closed.  It simply took a nudge to get it
to
>appear... not to make it disappear on-cue.

Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Hi !

Just a few questions :

Does Crystal Reports always does bugs when you save a report on another
name and try to change the tables used ?

Does it always makes bugs when opening a query with Access ?

I had a project with VB (4 16bits and ACCESS 2) and encountered these
small bugs very irritating because I had to make some reports several
times. And in another project, we have decided to use Access reports...

I will have to work again on this project. If you say CR6 is far better
and don't have any more bugs, may be I will try it...

Best regards,

Frdric GUILLIEN

Quote
Sundial Services wrote:

> Here's something that I didn't know how to do, and having found out how to do
> it I thought I'd spare the rest of you the trouble.  :-)

> Most of us use Crystal Reports at least now-and-then because it's a good
> report generator that can do more than the "stock" report-generators we may
> have on hand.  It is relatively straightforward, when using this product, to
> present a report in a preview-window that is an MDI child.

> But how do you get the newly-created preview window to show up on the Window
> pulldown of the parent?  Oddly enough, Crystal Reports Pro 6.0 (at least) does
> not do this for you.  But you can accomplish this with a single Windows API
> call:

>         SendMessage(Application.MainForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0);

> {This is Delphi ... you would use different declarations in Paradox ObjectPAL
> to invoke the API-call or to obtain the Windows handle of the parent window.}

> This message, which interestingly enough is addressed to the parent window and
> does not identify the child-window in any way, will cause the parent to
> reconstruct its child-window menu list.

> Also interestingly, I found that the menu-entry (correctly) disappeared on its
> own when the preview window was closed.  It simply took a nudge to get it to
> appear... not to make it disappear on-cue.

Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Re:Tip: How to put a Crystal Reports preview-window on the Window pulldown


Update on this.  I found the program I was looking for
http://www.gd-ind.com/

Now I can use any OBCD data source and make a HTML file
which is fully customisable with a script file that takes a combination of
code and HTML tags.   WUNDERBAH.

Quote
Noela Hill wrote in message <34fe530...@news.eis.net.au>...
>Thank you for the tip,  I'll keep it with my Crystal 6 manuals.

>I've found Crystal reports very easy to use from the days of Borlands
Object
>Vision which had an
>early version, then recently after struggling with reportsmith on Delphi 1.
>Crystal 4.5 came fee on
>a Brittish magazine CD - I used that to great advantage and ease (compared
>to report smith)
>and just recently purchased Crystal 6.

>I've used the export to HTML with success - but would like to have a bit
>more functionality
>for example I have URL in my database and I would like the finished web
page
>to show the URLs as links.
>any suggestions?

>Thanks again for the tip.

>Sundial Services wrote in message ...

>>Here's something that I didn't know how to do, and having found out how to
>do
>>it I thought I'd spare the rest of you the trouble.  :-)

>>Most of us use Crystal Reports at least now-and-then because it's a good
>>report generator that can do more than the "stock" report-generators we
may
>>have on hand.  It is relatively straightforward, when using this product,
>to
>>present a report in a preview-window that is an MDI child.

>>But how do you get the newly-created preview window to show up on the
>Window
>>pulldown of the parent?  Oddly enough, Crystal Reports Pro 6.0 (at least)
>does
>>not do this for you.  But you can accomplish this with a single Windows
API
>>call:

>> SendMessage(Application.MainForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0);

>>{This is Delphi ... you would use different declarations in Paradox
>ObjectPAL
>>to invoke the API-call or to obtain the Windows handle of the parent
>window.}

>>This message, which interestingly enough is addressed to the parent window
>and
>>does not identify the child-window in any way, will cause the parent to
>>reconstruct its child-window menu list.

>>Also interestingly, I found that the menu-entry (correctly) disappeared on
>its
>>own when the preview window was closed.  It simply took a nudge to get it
>to
>>appear... not to make it disappear on-cue.

Other Threads