Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to open report in Mode 1

Status
Not open for further replies.

GhostWolf

Programmer
Jun 27, 2003
290
US
I'm having a problem opening a report from VB:

Due to constraints here, I have to use CRW v6; I'm using the Crystal Report Control component; the report opens and displays the requested data with no problem.

The report's destination is crptToWindow.

What I need is to be able to display the report, and trap the printer output. (If the user selects a fax printer, I need to send some addressing info via DDE; the user is also allowed to print to a local printer.)

The problem is that as soon as the report displays, control returns to the program.

So far, I haven't been able to figure out how to open this thing in "Mode 1". I thought that the .Action property might be it, but apparently it's not. (Crystal's Developer Help doesn't bother to list the possible values for .Action, but I've found that the values 0-3 make no difference.)

Then I tried the .Status property: it's always 3!! (I assume this is because the report's destination is "window", and it's being displayed.)

Please!! Can anyone tell me what I'm missing here?


 
CRPEAUTO was available in CR6 - it's an automation server interface for Crystal - not brilliant but better than the OCX.
Alternatively, the RDC was first available as a download for CR6 - I don't know where to get it now, but I'm sure someone on this forum still has the original download.



Andrew Baines
Chase International
 
Andrew,

Thanks for the response, but it still doesn't solve the problem: control still returns immediately to the program when using .Preview. This time, I don't see a .Status property to check.

It also raised another problem: type mismatch...

I got around that by using the .SetCurrentValue function - but it apparently wasn't used, (the data's there, but the report was blank!).

I'd really appreciate any guidance you can offer, 'cause right now I'm honestly wondering if any development package could be any less developer-friendly!
 
NOTE: I've managed to get past the .ParameterFields(1).SetCurrentValue problem by replacing it with .RecordSelectionFormula= and removing the parameter.

Now I've got a report with the correct data on it...

... but I still need to figure out how to the program from proceeding 'til the preview window has been closed.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top