Link to home
Start Free TrialLog in
Avatar of pak_slm
pak_slm

asked on

Pass selection formula to .Dsr file

Hi,

I am using vb6, crystal report 7 and Access database.

1. I design a report useing a query, use selection formula and call from vb its ok.

2. When i add crystal report in vb project it shows extension dsr and use CRViewer1 to view report. How i pass selection formula in this way.

what is the best way to handle report from upper two ways because i want that report files are compile with the form.

Thanks.

Avatar of kzbera
kzbera

If my guess is correct you are trying to build a vb program for internet where you are trying to call a crystal report through your vb application.
So you have created IIS application using a special type of Visual Basic project. The result is an ActiveX DLL project type that automatically includes an instance of the appropriate ActiveX designer. That designer, called a WebClass object, acts as the base on which you create your application and is underneath your pages.

Actually you have created a WebClass project in Visual Basic 6.0 because WebClass designer files have the extension .dsr, for "designer. What happened You save the designer, the default module, and the project file. Designers end with the extension .dsr, whereas modules have the familiar .bas extension and projects have the .vbp extension.
For detail the following link will help you a lot to get rid of your second problem:
http://www.devx.com/upload/free/features/webbuilder/1998/09sep98/cc0998/cc0998.asp
Avatar of pak_slm

ASKER

No i am not build for internet.

Just open a standard exe project in vb, add some forms for data entry. Right click on project and select crystal report and design report and save it with dsr extension. it also add a form having control CRViewer1 on it.

So i view report in this way but base of my report is sql query and i want to pass where condition i.e. pass selection formula to a .rpt report file.
Avatar of pak_slm

ASKER

No i am not build for internet.

Just open a standard exe project in vb, add some forms for data entry. Right click on project and select crystal report and design report and save it with dsr extension. it also add a form having control CRViewer1 on it.

So i view report in this way but base of my report is sql query and i want to pass where condition i.e. pass selection formula to a .rpt report file.
There are lots of Q & A in this site.
Go through these..
Best of luck
ASKER CERTIFIED SOLUTION
Avatar of EYoung
EYoung
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pak_slm

ASKER

EYoung

one thing else

How i can i display my input as criteria as header on report.

pak slm,

Sorry for the delay.  I only work at this client on Mondays and Tuesdays and I don't always check EE.

What I do to display input as criteria is to either print the parameter you pass in the report header or create a formula like:  "Input 1:  " & Parameter1 and then print the formula in the header.

Another thing is that I try to always print the report parameters in the header or footer of the report.  That way the user can see what the inputs were that went into creating the report.  (Also, I can more easily understand how the user printed a report if they come to me later and say the report is not working correctly.)

Hope that helps.  EYoung