Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Display Crystal Report VIA Visual Basic


How do I display a Crystal Report through Visual Basic code? What is the syntax to display the report ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Stuck With Report Design (Visual Basic .net/Crystal Report)
Hi all,

Im stuck with this report. My task is to create report from table that was designed by someone else and it cannot be changed.


The table schema is like this:
*******************************
accountID -----------------------int primarykey
batchNo---------------------------varchar
name --------------------------- varchar
icno ------------------------------varchar
coop1----------------------------varchar
invoiceNo1---------------------- varchar
amount1------------------------- float
coop2 --------------------------- varchar
invoiceNo2 ----------------------- varchar
amount2 ------------------------ float
coop3 --------------------------- varchar
invoiceNo3 ----------------------- varchar
amount3 ------------------------ float
coop4 --------------------------- varchar
invoiceNo4 --------------------- varchar
amount4 ------------------------- float
coop5 -------------------------- varchar
invoiceNo5 ---------------------- varchar
amount5 ------------------------ float
..
..
..
..
coop10 --------------------------- varchar
invoiceNo10 -------------------- varchar
amount10 ----------------------- float
********************************
The coop/invoiceNo/amount actually up to coop10.

The coop1 to coop10 fields is optional.. meaning some account can have only 1 or 2 coop and other will be empty.


accountID: BatchNo: name: icno : coop1: invoiceNo1: amount1: coop2: invoiceNo2: amount2: coop3: invoiceNo3: amount3: ......... coop10
0000001 A0001 Danny 123 CoopA 123 25.50 CoopB 123 110.34 CoopAX 251 110.66
0000002 A0001 David 5452 CoopM 123 25.50 CoopA 123 150.34 null null null
0000003 A0002 Marry 6655 CoopA 123 25.50 null null null null null null
0000004 A0002 Jack 1544 CoopA 123 25.50 CoopB 123 110.34 null null null
0000005 A0001 Lind 1235 null null null null null null null null null
  
In the Crystal Report i need to group the report by batch number with this format:


Date:

Batch: A0001
           
                   No: AccountID: Name: ICNo: Coop List: Invoice No: Amount:

                   1 0000001 Danny 123 CoopA 123 25.50
                                                    Coopb 123 110.34
                                                    CoopAX 251 110.66
                   --------------------------------------------------------------------------
                                                     Sub Total: 246.50
                   --------------------------------------------------------------------------


                   2 0000002 David 5452 CoopM 123 25.50
                                                     CoopA 123 150.34
                   --------------------------------------------------------------------------
                                                     Sub Total: 175.84
                   --------------------------------------------------------------------------


                   -------------------------------------------------------------------------
                                                 Grand Total: 422.34
                   --------------------------------------------------------------------------
The data will be generated from vb.net and filled to dataset from data adapter.
I will pass the dataset to crystal report using reportsource.

eg.
        x.xCRListSetAmtCOOP.SetDataSource(edt)
        x.CRAccount.ReportSource = x.xCRListSetAmtCOOP

The problem is how can i display only COOP with value inside the table to the report?

PLEASE HELP..OR AT LEAST GIVE ME SOME CLOSES SOLUTION ON HOW TO SOLVE THIS.

I dont know if CR can generate this report with that table schema or not.. pls help.. really..
thanks in advance








Edited by - racyde on 6/7/2006 10:46:48 PM

Getting Crystal Report Messages While Executing Report From Visual Basic 6.0
Hi,

I am trying to execute Crystal Report from Visual Basic. I am getting some messages while executing the report, which I want to suppress.

I am using Crystal Reports XI and Visual Basic. I am connecting to SQL server database using ODBC connection. I am using CRAXDDRT class library.

I have set all required properties for processing crystal Reports like database connection, Report file, Export options, Export report file, Database table connection properties. Before exporting I am verifying the database by CRReport.Database.Verify command. Then I am using CRReport.export (False) command to export the report output to some disk file format (Excel, PDF etc.)

But when the CRReport.export command gets fired, it shows me message like “The database file Mytable has changed. Proceeding to fix up the report”. I do not want to get displayed this message, as my requirement is to execute report silently without having any user interaction.

Please let me know if any one has solution to this problem.

Crystal Report And Visual Basic
how can I do To assign by Vb code a Crystal Report TableAliasName???

I need to point to a table of a DB by Code using the Crystal Report VB Engine!!!

Please Help Meeeeeeeeeeeeeeeeeeeeeeeeeeeeee!

Help For Crystal Report And Visual Basic
Hi!
I am using crystal report 8 and visual basic 6 with sql server 2000 as backend
I have a varible 'dos(date of sales)' declared as varchar in sql server

I have 2 parameters declared as string in crystal report 8 to which i am passing the vales from vb as

strt = DTPicker1.Value
end = DTPicker2.Value
CrystalReport1.ParameterFields(0) = "start;" & strt & ";true"
CrystalReport1.ParameterFields(1) = "end;" & end & ";true"
CrystalReport1.PrintReport

i am using the select expert option to show 'dos' between 'start' and 'end' parameters.

Now i want to know is :

How can i show a report which displays dos which should be between 'strt' and 'end' parameter values.
As dos is varchar and 'strt' and 'end' paramaters are string.
If i convert them to date sql server supports only datetime but not date only

thanks for ur help in advance
Mukul

Crystal Report 11 And Visual Basic 6....
HI,

I have installed Crystal Report 11 Developer Edition and Visual Basic 6 w/
Service Pack 6.

I have confirmed and selected the following entries for my VB6 project:

-->References window:
1. Crystal ActivX Report Viewer Library 11.0
2. Crystal Reports ActivX Designer Design and Runtime Library 11.0
3. Crystal Reports ActivX Designer Library 11.0

-->Components -> Controls window:
1. Crystal ActivX Report Viewer Library 11.0

-->Components -> Designer window:
1. Crystal Reports 11


I have also attached a jpeg file illustrating the components --> "references and components.jpg". Please tell if I need to add any extra entry.


I need to create reports. How do I proceed ? And where do I start designing the layout of my reports, is it the Windows start meny entry for
Crystal Reports 11 ...OR ... is it by adding the "CrystalActivXReportViewer" control to a form in VB6 IDE ??

It would be more preferable, too if someone could provide me their YAHOO Messenger ID, so that I could get into some real discussions with them LIVE!

----
Regards

Using Crystal Report With Visual Basic
Hi everyone!

Can anyone give me some websites on tutorial on how to use or integrate crystal reports in visual basic. thanks in advance

Crystal Report And Visual Basic, Pls Help!
I declare:

Dim crxApp As New CRAXDRT.Application

for using crystal report at the run time, but when I compile , I got this message:
User-defined type not defined.

I know I missing some dll , but when can i find it?

pls help me. Thanks in advande.

Chiavoi

Visual Basic 6.0 Crystal Report 8.5
How can I stop the proces in crystal report once It has started.

Visual Basic 6.0 And Crystal Report 8.5
I want to know how can I change a group field of crystal report dinamically in visual basic.

Thanks.

Using Crystal Report 8.5 In Visual Basic 6.0
am using crystal report 8.5 .
am new to this one..

my requirement is..

eg:in database there are fields like number,date,credit etc..
but, there is no primary key..
my number is like jv0607001,jv0607002.......so on...
but,for same number am having at least 2 to 3 entries with difference of date or credit etc..

jv0607001 23/07/2007 2300.00
jv0607001 24/07/2007 2400.00
..............
so on..
jv0607002 24/07/2007 1500.00
.............



so, in my report for that number i have to generate the report..
for a single report am able to display..

so, my requirement is..



user will give that THE DATES AS "FROM 23/07/2007 TO 26/07/2007"



so, i have to display the reports from date to the given date as seperate reports for every number...



if there is one record in database against that number i can display..
but,am unable to display for multiple records in database against that number.

so, can any body please help me..

if you have not understood the requirement please let me know..
please give me some solution

Visual Basic 6.0 And Crystal Report 8.5
I have a problem while creating set up with crystal
report 8.5
It is giving error.
But if I create setup when crystal report 7.0 it
doesn't give any problem.

Is there is any other things are required for crystal
report 8.5 while creating set up.

Reg Crystal Report In Visual Basic
Hai,

Can any one help me out in retreiveing value from crystal report control using Visual Basic 6.0 .

My prob is to validate a control ex: Version(In Crystal Report )
through Visual Basic 6.0.



 

Crystal Report 11 + Visual Basic
Hi

i m right now working on crystal report 11 and i want to connect my report with visual basic,
and i read some post regarding this topic ,so can anybody tell me regarding CRAXDDRT.dll this file.
where can i find this file.
bcs i m not getting this file for download purpose.
also tell me other detail regarding the connection for this as early as possible

thank u

Visual Basic 6.0 & Crystal Report XI
I am developing a application Using Visual Basic 6.0 And MS-Sql2000 Server. I m using Crystal Report XI for report Generation. But i am unable to find the control for Crystal Report in Visual Basic Component List.

My Question is:
Which Control Should Place on VB Form?
What is code for calling the Report from Crystal Report XI using Visual Basic 6.0?

Ashok

Crystal Report 9 And Visual Basic 6.0
Hi friends ! I am new to Crystal Reports and Presently using VB 6.0 but I dont know how to call and print crystal report from visual basic..... I want the complete code ....
Just Please help me.... and if anyone needs the help of visual basic 6.0 I am here ...
Just share the knowlede .... plz

vikramjb : topic moved to vb reporting section from dotnet reporting section



Edited by - vikramjb on 12/25/2005 8:01:37 PM

Visual Basic 6.0 + Crystal Report 8.5
Guys,
I need some help, I have coded visual basice database, using crystal report at runtime and displays the record that’s is searched in the database, but when I complied the database with Windows Installer and install it on another computer, it doesn’t seems to work. It only display a splash screen

Here under is the code I am using

With CrDischarge
        .ReportFileName = App.Path & "
eportscharge.rpt"
        .Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "Care.mdb;Persist Security Info=False"

        .DiscardSavedData = True
         
       .RetrieveDataFiles
        .ReportSource = 0
        .SelectionFormula = "{care_discharge.pid}='" & strVID & "'"
        .ReportTitle = "Discharge Report"
        .Destination = crptToWindow
        .PrintFileType = crptCrystal
        .WindowState = crptMaximized
        .WindowMaxButton = False
        .WindowMinButton = False
        .Action = 1
    End With
  
End Sub

CR distribution

agentctl.dll,craxddrt.dll,craxdrt.dll,crdesignerctrl.dll,crviewer.dll,crystalwizard.dll,cpeaut32.dll,crpaig80.dll,crpe32.dll,crystl32.ocx,implode.dll,mscal.ocx,p2smon.dll

Am i missing anything??
thankx in advance

Visual Basic 6.0 + Crystal Report 8.5
Guys,
I need some help, I have coded visual basice database, using crystal report at runtime and displays the record that’s is searched in the database, but when I complied the database with Windows Installer and install it on another computer, it doesn’t seems to work. It only display a splash screen

Here under is the code I am using

With CrDischarge
        .ReportFileName = App.Path & "
eportscharge.rpt"
        .Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "Care.mdb;Persist Security Info=False"

        .DiscardSavedData = True
        
       .RetrieveDataFiles
        .ReportSource = 0
        .SelectionFormula = "{care_discharge.pid}='" & strVID & "'"
        .ReportTitle = "Discharge Report"
        .Destination = crptToWindow
        .PrintFileType = crptCrystal
        .WindowState = crptMaximized
        .WindowMaxButton = False
        .WindowMinButton = False
        .Action = 1
    End With
 
End Sub

CR distribution

agentctl.dll,craxddrt.dll,craxdrt.dll,crdesignerctrl.dll,crviewer.dll,crystalwizard.dll,cpeaut32.dll,crpaig80.dll,crpe32.dll,crystl32.ocx,implode.dll,mscal.ocx,p2smon.dll

Am i missing anything??
thankx in advance

Visual Basic 6 And Crystal Report 7
Hello Every body
I made a setup of an application in visual basic 6 and crystal report 7 ,but when i am installing the setup in the new computer without visual basic 6 and without crystal report then application is running fine but Report is not working,nothing comes when i click on button,not even error message.
What do I do ?

Visual Basic 6 With Crystal Report 8.5 Help
I'm developing a project and i'm using crystal report 8.5 "RDC" for my reports and when I compile the program
and install it to a client machine , try to run the report option and i got this error with no results , and in the project not compiled it works fine.


  "RUNTIME ERROR '406'_
    
    Non modal forms cannot be displayed in this host application from an Active X DLL, Active x Control or property page"

Crystal Report 10 In Visual Basic 6.0
i am trying to open crystal report 10 report object in visual basic 6.0 . i am facing problem while refreshing report in vb program , it shows login failure and show me old report data .
how do I solve this problem?

my database is SQL 2000
I am using Crystal Activex Report viewer library 10.0 .

i am stuck, wiithout this i am not able to procide further. please help me asps
Rupal

How Can I Use Crystal Report In Visual Basic 6.0
In visual basic 5.0, it can create report using crystal report.But In visual basic 6.0,I can't find the crystal report,I must use data report to create report. Can I use crystal report in visual basic 6.0?

Calling Crystal Report 9.0 From Visual Basic
hello ,

I would like to know how to call crystal report (9.0) from visual basic 6.0. after installing cr9.0 on my system i couldn't see crystal report control in my visual studio. i could see crystal report viewer control and other many control in visual studio. Please tell me how can i call a crytal report 9.0 from my visual basic program.


regards

Crystal Report 9 Using Oracle OLE DB In Visual Basic
I have this big problem coz everytime i used this code

ConnectionInfo.Item("Provider") = "OraOLEDB.Oracle.1"

i always get an error message

what seems to be the problem with this

Visual Basic With Crystal Report Viewer
I have had a number of problems using Crystal Reports in a Visual Basic application, but finally, finally have the problems resolved - except for one. This is a new one, something that has popped up just recently, and I am hoping there is a simple explanation.

I am loading the Crystal Report into the Visual Basic Crystal Report Viewer - which works fine. I press the Print icon on the CR Viewer, and nothing prints. No error, nothing. I go to Settings, Printer, and test the printer, and it prints a test page fine. I signed off as my client ( I was testing under his login), log-in as myself (I have higher machine permissions) but have the same problem. I go back to my own cubicle, with my own machine, and run the executable, which points to a different printer. When I click the printer icon in the CR viewer, nothing happens. But the printer prints anything from any other application. I even tried the program directly from the Visual Basic Development Environment, the same problem.

Anyone had this before? I hope so, so that you can tell me how to fix it. Bringing this application up has been a long battle, and this appears to be the last item that is 'stuck'

thank you, laurie

Can I Integrate Crystal Report 11 Pro To Visual Basic?
Hello folks I would like to ask f it's possible to integrate crystal report 11 to visual basic? Can I ask how? A few samples will be very helpful. Thanks and god bless.

btw I have crystal report 11 professional not developer ed.

Visual Basic 6 & Crystal Report 9 & Office XP
Hello!

I have a problem

App=visual basic 6 (sp5) & Crystal report 9.2.3.970 (view&edit)


Crashed:
When i open form second time with crystal report (view&edit).

App crash, when I install office XP. When uninstall Office XP, App works fine. I tried with cr hotfix,


Here is sample code:

Private Sub Form_Load()

Dim m_Application As New CRAXDDRT.Application
Dim m_Report As New CRAXDDRT.Report

'Open the selected report.
Set m_Report = Nothing
Set m_Report = m_Application.OpenReport("c: mp
acun.rpt", 1)
'**

'Preview
CRViewer1.ReportSource = m_Report ' Set the report source.
CRViewer1.ViewReport ' Set the viewer to view the report.
'***

End Sub


Please hlpm!!! thks.

Stanislav

How To Add Hyperlink In Crystal Report Though Visual Basic
Hi there,

Any body knows that How to add Hyperlink in Crystal Report though Visual Basic.

Thanks,
Taj

How To Add Hyperlink In Crystal Report Though Visual Basic!!!
Hi there,

Yes, I mean open a Crystal report from VB. It is working fine but i need to add hyperlink record in crystal report so that it can show either another report thought that record or show rest of information for that record on the same page when particular hyperlink clicked. My problem is that when i open report through vb hyperlink does not work.

If you have some idea please help me.

Thanks in advance,
Taj

Visual Basic: Convert Crystal Report To Pdf
I'm trying to convert a crystal report to pdf in Visual basic, but while the first page appears without problem the second page of the report is blank.

Does anybody know if there are format options or export options that I need to set.
Many thanks for your help

kind regards


Using Visual Basic 6.0 With Crystal Report 10.0 Question
One of our developers is having a problem with connecting Visual Basic 6.0 to a Crystal Report V 8.5 that's been migrated to version 10.0.  The report works fine in Crystal Reports 10.0 but when he tries to connect to Visual Basic 6.0 he gets the following error message--"20525 Unable to open Report".

Does anyone have any suggestions that I can pass on?

Thanks!

Sandy

How To Connect Crystal Report 9 From Visual Basic 6
Hello,

I need to know how can I add my report created in crystal report 9 from my visual basic (v 6) form. Some info about my report:

** my report is created on crystal report 9.
** it is using OLE DB connection to connect with my database.
** my database is in ms-access and password protected.

So, I need to know--

=how to set the location of the database from vb6 for the report
=how to refresh data each time the form is run
=how to provide password for the database

Code example will help me lot. Thanks in advance

belal

Want's E-BOOK Of Crystal Report With Visual Basic
Hello Friends,
     I want the link of E-books on witch the e-book of Crystal report with VB i saw.

Crystal Report Query Help In Visual Basic
Hello intellectual friends..

I am having problems..

I have created a report through Crystal Reports Designer in Visual Basic 6 . (Crystal Reports 8.5), but I am not getting the report according to my query..instead the report is showing all records....

The programming which I have done in the Form (preview) is as follows :

in Option Explicit
Dim Report as New CrystalReport1
Dim adoRs ad ADODB.REcordset

Then in Form_load()

Dim SQL as String
SQL = "SELECT" & _
          "IntlMst_1.`Code`,IntlMst_1.`EduSubj1`" & _
          "From" & _
          " `IntlMst`IntlMst_1 " & _
         "Where" & _
         " IntlMst_1.`Code` = `AC000002`"
Set adoRs = CreateObject("adodb.Recordset")
adoRs.open SQL, "database = IntellConsMst.mdb;uid=;pwd=;dsn=IntlCnstMast",adoOpenKeySet,adLockBatchOptimistic
CrystalReport1.Database.SetDataSource = adoRs
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

But still I am getting all records..instead of specific records according to the SQL Query.

Can anyone explain to me what can be the problem???

Regards..
Gold

Visual Basic - Crystal Report If Condition !
Private Sub cmdShp_Click()

CrystalReport1.ReportFileName = App.Path & "/StockMEwoc.rpt"
CrystalReport1.SelectionFormula=
 "{SC010200.SC01037}='" & cmbProduct.Text & "'"
CrystalReport1.WindowTitle =
cmbProduct.Text & " Stock Detail"
CrystalReport1.Action = 1
End Sub

The above is the command button code. When I click the button, the value of cmbProduct.text is passed to crystal report and the related records is showing correctly, my problem is when the user type in the combobox (i.e) cmbProduct and when it is not available in the recordset, then it have to give a warning message "No Matching Records". I tried in many ways upto my knowledge I can't get the exact result. Kindly suggest me shall I use a If or For Statement if yes, how can I use them. Now what happens for the above code is, the crystal report is show blank with no records in Crystal report when the user enters a unmatched entry in to the combobox. If you are not clear with the information, I attatch the form with this. Kindly reply me.

Thank you very much,
Chock.




<HTML>
<B><font color="#008000">HAVE A NICE DAY !</font></B>
<HTML>

Creating Crystal Report Through Visual Basic 6.0
Hai,

I had done one project named as Resume handler. In this we are storing the entire details of candidate resume.
I had added one search form in with softaware,qfn,location as search options. The shortlisted candidates are listed in Flexgrid control.

My need is If I click on a candidate name in the Flexgrid control then a report will automatically generated by using the data in the database.

I am new to programming. How to connect the VB 6.0 with Crystal Report 11? How we can pass the required arguements from VB to Crystal Report? How can I allign the data in Crystal Report?

I am using Visual Basic 6.0, MS Access 2000, Crystal Report 11.

Please help me to solve this problem.

Thanks in advance.

Using Crystal Report Writer In Visual Basic
Hi every One,

I am using crystal reports 7.0 with visual basic. When i send my report output to a "Msword Document", the fonts and formating is distrubed in the document. I am using "Courier New",12 font in my report but "Msword document" show it as "Times New Roman",12. Is there any way to preserve my settings in "Msword document" ?

Thanks in advance
Naeem Afzal

Unable To Update Crystal Report From Visual Basic
My problem is i have function called preview report. When the user select a new contract and clicks on the button, the report should be updated with the new contract. But, it does not get updated with the new contract. It still shows
the old record.

I will show you my code and explain what i have done.

i am using crystal report 8.5 and VB 6.0

I am using

Function preview_Report()

Dim rsd As ADODB.Recordset
Dim rs_cmd As ADODB.Command
Dim query_temp As String
Dim test As String
Dim cp_no As Long
Dim dt As String

dt = ""
dt = built_date
'********************************************
'built_date Its a function to get the year and '
'month from the user and combined. Its a criteria that
'is used in the query
'*********************************************
cp_no = 0

cp_no = Combo1.Text
'**********************************************
'cp_no is the contract no that is selected by the user
'Used as a criteria in the query
'**********************************************

query_temp = ""
query_temp = " Select agency_name, agency_add, advertiser_name, advertiser_add, camp_no, "
query_temp = query_temp + " camp_origination_date, camp_pree_status, order_no, product_name, "
query_temp = query_temp + " camp_start_date, camp_end_date, spot_no, spot_duration, "
query_temp = query_temp + " spot_type, spot_air_date, brek_nom_time, prog_name, channel, "
query_temp = query_temp + " spot_code, spot_price, copy_code "
query_temp = query_temp + " From campaign_summary_direct Where camp_no = " & cp_no&
query_temp = query_temp + " And spot_air_date Like " + dt

'********************************
'query temp is the query that will be passed to
'Ado.command to be executed
'I have tested the query and i am very sure that
'its fine.
'***********************************


Set rs_cmd = New ADODB.Command
Set rsd = New ADODB.Recordset

on error goto x

'*************************************************
'on error go to x is need when the function is executed
'for the first time , because the rsd recordset is
'not opened,

'*************************************

rsd.close


x:

rsd.Open query_temp, cn_temp, adOpenForwardOnly, adLockReadOnly


Set rs_cmd.ActiveConnection = cn_temp
rs_cmd.CommandText = query_temp
rs_cmd.CommandType = adCmdText
Set rsd = rs_cmd.Execute(query_temp)

Bound_report
'*************************************
'Bound Report is a function set unbound fields. My report
' has unbound fields in it.
'I have checked and its Fine
'**************************************

Report1.Database.AddADOCommand cn_temp, rs_cmd
'cn_temp is the connections string defined and set
'during form load.


Form1.CRViewer1.ReportSource = Report1
Report1.ReadRecords
Report1.DiscardSavedData
Form1.CRViewer1.ViewReport
Form1.Show

End Function


Further explanation

I am very sure that the query is executed with different criteria. so this cannot be the reason why the report is
not being updated. What happens is when i first start my program, i select the contract no = 1000 and the report gets updated with ccontact 1000. then lets say i select
contract 1200 , the report still shows me contract 1000.

any subsequent execution of preview report function shows me contract 1000. So only the first attempt , right after i start the program shows me the correct contract.

i have used Report1.DiscardSavedData to remove saved data, if there is any.(Does not work)

I have used Report1.ReadRecords to force it to update the data in the report from the ADO.command,(Does not work).


i am using windows 2000 , reports is saved as dsr.

Exporting Crystal Report To Word Using Visual Basic
Hi experts,

When I export crystal report to word file the records are displayed properly but the Lines and Boxes that are used in the Crystal report are not displayed in the word file .please advice...

Crystal Report Designer In Visual Basic - Urgent
Designing reports in Crystal Reports (Development Package) and linking with 'Crystal Report Designer' in Visual Basic works only for the first time but after making any changes in Crystal Report Designer, report is not getting opened. It flashes an error message "Server is not yet been opened".

Problem In Getting The Desires Out Put In Crystal Report / Visual Basic
Hi VB/Crystal Report Experts
Good day to all of you
I am using crystal report 8.5 (Backend Oracle 9i)
I am trying to write a formula using control structures
for subtraction each invoice amount from the total down payment to the
supplier
until payment amount less than invoice amount
that is my condition is if total payment amount greater than invoice amount
then
subtract inv. amt form total payment amount and check if 2nd inv amount is
less than tot pay amt
then again subtract 2nd inv. amt from the remaining pay amount and so on
hope u understand my task since I am writing in very hurry, Pls very urgent
SI J/997047 27-Sep-2003 8,500.00
SI J/997048 29-Sep-2003 5,000.00
SI INV#997046 27-Oct-2003 5,152.00
SI INV#997046/1 27-Oct-2003 1,023.70
SI INV#997046/2 27-Oct-2003 8,637.00
SI INV#997577 & 997665 30-Jan-2004 810.00
SI INV#997747 28-Feb-2004 950.00
SI INV#997786 28-Feb-2004 295.00
i want to subtract the paid amount 29122.7 one by one invoice to make the
invoice value to zero and disappear from the list
that is 29122.7 - (8500+5000+5152+1023+8637+810) and now paid amount
becomes zero and remaining last two
invoices to be paid that is 950+295 of balance 1245 (due amt) which should
only display in the report
if not paid the invoice no and amount should appear in the report and the
due amt.

Actually my problem is i want to generate a report for supplier due invoices
since we received invoices from the supplier and we pay them not according
to the invoices
submitted but we pay them as a down payment amount and then the invoices
amount
will be deducted from the down payment amount so our finance dept. need to
know what the invoices we have to pay to the supplier that is due invoices
and only due invoices should display in the report the paid invoices should
be disappear from the report
and these invoices and paid amount is for specified date
Note: i didn't get the logic how to read each invoice amount and subtract
from the total down payment
until the down payment amount becomes zero and suppress the paid invoices
from the report
and display only unpaid invoices in the report
hope u understand my question

I would be very much thanks and appreciate if any one help me with code to
accomplish the above task



Thanks and regards
Abdullateef

How To Import Crystal Report Into Pdf Format Using Visual Basic.
fellow experts,

i would like to import my crystal report into .pdf format using vb. Any ideas in that ? would like to hear from you.

Visual Basic 6 And Crystal Report 4.6 On Internet Explorer 7
hi everyone,

I'm a newbie on development and I'd like to send a Report to Internet Explorer 7 through Visual Basic 6 but I don't know what am I do to start.
Please help me

Thank you in advance
TripleXL

Problem In Crystal Report Ver10 With Visual Basic
Hi,

I am developed a visual basic project and have used crystal report 8.0 for reports.But now i am using crystal report ver10 but when i am generating the report through my project it is giving error
"Reports not loaded"
although the reoprts are placed in the correct folder.In the log file generated the messgae is
"Invalid report version"
I got one solution that is to use crystal report viewer control but for this i have to make changes in the coding but i have the final setup of the project at the client site so i cannot make changes in the coding.
Is there any alternative to this problem?
Plz send me the reply asap, its urgent.

Thanks in advance.
Regards,
Rakesh Kashnia

Passing Crystal Report Parameters Using Visual Basic
Hi There,

I am developing a small module for displaying the Price Catalog based on the Inventory Category.
The Crystal Report I have developed is in 8.5 and now am trying to call the same from Visual Basic.
I have created two Parameter fields in Crystal Report (StartCategory and EndCategory).
When I Preview Crystal Report, it prompts me for the Value of the Parameter field and display the
Report as per the selected Citeria, but when the same does not work for Visual Basic.

In Visual Basic, I have created two combo box, where in the User will specify the Start Category and End Category.
When i click on display button, the report is displyaed on the screen but with no data???

Could you please guide me as to how can i comeplete this small module?

Bst Rgds
                

Crystal Report 9(CR) And Visual Basic.net Window Forms
Hi
I am new to new to this area.
I am currently on a project using Crystal Report 9(CR) and visual basic.net window forms
A brief introduction to my project
PlanA
1) I have 2 labels ( PatientName and DateOfVisit ->eg Cindy and 01/10/2004) and 2 buttons (Questionaires A and B) on the Form1
2) I click a button “Generate report” on Form1
3) It will lead me to Form2
4) In Form2 I use the CrystalReportViewer to display the report.
5) User are allowed to select either report of Questionaires A or B with a combobox
6) After selection. Click on the “Display Report” button the report will be display on the CRViewer (Refer to Code1)
7) When user click on the “Export Report”
8) A dialog box appear user can select the save in and type(word,exel,adobe acrobat).
9) The report in the selected type is exported.

But this does not fit into the requirements.
What the requirements want is that
In the brief introduction above.
PlanB
1)    à 2) à 9) [skip steps 3 to 8]
In other word, when user click the “Generate report” it will export the 2 Questionaires to pre-selected type in the code. (Eg user want them in MS word.)
I have tried with the Code2(refer Code2) but it gives me the following errors
Name ' CrystalReport1' is not defined.



Do anyone here know to solve the above 2 errors and if handle PlanB situation before or know how to go about doing it. Kindly advised. Thank you

Code1
Private Sub btnDisplayReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplayReport.Click

        MyCrystalReportViewer1.ReportSource = Nothing

        Dim PatID As New ParameterDiscreteValue()
        Dim PatDate As New ParameterDiscreteValue()

        PatID.Value = strPatID
        PatDate.Value = strPatDate

        Dim paramList As New ParameterFields()

        Dim paramTemp As New ParameterField()

        paramTemp = New ParameterField()
        paramTemp.ParameterFieldName = "PatID"
        paramTemp.CurrentValues.Add(PatID)
        paramList.Add(paramTemp)

        paramTemp = New ParameterField()
        paramTemp.ParameterFieldName = "PatDate"
        paramTemp.CurrentValues.Add(PatDate)
        paramList.Add(paramTemp)

        MyCrystalReportViewer1.ParameterFieldInfo = paramList
        If ComboBox2.SelectedItem = " Questionaires A " Then

            MyCrystalReportViewer1.ReportSource = Application.StartupPath & ".. QuestionairesA.rpt"


        Else
            MyCrystalReportViewer1.ReportSource = Application.StartupPath & ".. QuestionairesB.rpt"
        End If

    End Sub
  

Code2

Imports CrystalDecisions.Shared

  Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim myReport As CrystalReport1 = New CrystalReport1()
        Dim DiskOpts As CrystalDecisions.Shared.DiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions()
        myReport.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
        myReport.ExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
        DiskOpts.DiskFileName = "c:Output.pdf"
        myReport.ExportOptions.DestinationOptions = DiskOpts
        myReport.Export()
    End Sub

How Do I Know That I Can Late Bind Crystal Report In Visual Basic 6
Hello,

I am trying to build a program that already works and is in the production box, but in my box i cannot get it to run in design mode.

This are the lines of code:
===================
1 Private rptCrystal As Object
2 Set rptCrystal = CreateObject("Crystal.CrystalReport")
3 rptCrystal.WindowParentHandle = Me.hwnd
4 rptCrystal.DiscardSavedData = False
5 rptCrystal.ReportFileName = strReportName
6 rptCrystal.Connect = "DSN=" & Trim$(strConnect) & ";UID=reporter;PWD=goldenhorseshoe;DSQ="

7 nReport = rptCrystal.GetNSubreports

And these are the following error when i run the program in design mode:

Lines 4 & 7 give me the following error:
============================
Run-time error: '438':
"Object doesn't support this property or method"

Has anyone come across this before?

Any insight will be greatly appreciated!

Antonio.

Delete Saved Data In Visual Basic's Crystal Report
hi...i have jus redeveloped a visual basic program that uses back the same crystal reports. currrently my crystal report is able to view the data, but it keep on viewing old data that i believed was saved inside the crystal report form. how do i get rid of these data? i haf written this code

Report.DiscardSavedData

and written the specific SQL statement that was needed, yet only the old data comes out... the sql statement retrieved the required record from the database and then saved it to another table in the database. i have checked the database and the correct records were retrieved and saved... it seems taht the problem is that the crystal report cant seem to get the data from the database...and instead displays the data that was saved previously.... do anyone haf any idea how to solve tiss??? thankssssssss

How Can I Pass A Parameter To Crystal Report 5 From Visual Basic Screen?
I am using Crystal Report 5 with Visual Basic 6. I like a use select a data from Visual Basic Screen and list value in the VB report, based on the selection. How can I pass a parameter to Crystal Report 5 from Visual Basic Screen?

Problem In Refreshing Crystal Report From Visual Basic-6 Very Ur Gent Pls.
Hi
Visual Basic / Crystal Report Experts

I have Developed Application in VB6 and Executing Crystal Report thru it.
( I am Using Oracle 9i Database as Backend and ODBC for Oracle 9i)

I have created the report query using Crystal SQL Designer
and i uncheck the option "Save data with Query" to get the updated data.

I make the report in crystal Report 8.5 using the query developed in
Crystal SQL Designer (above)
and uncheck the option "Save data with report" to get the updated data



and thru VB-6 i am running this report using the foll. code

Private Sub Cmd20_Click()
CrystalReport1.ReportFileName = "\ntserverfmg_applInventory.rpt"

CrystalReport1.WindowHeight = 600
CrystalReport1.WindowWidth = 800
CrystalReport1.WindowTitle = "Inventory Parts ...."
CrystalReport1.WindowLeft = 0 CrystalReport1.WindowTop = 0
CrystalReport1.Action = 0 End Sub

I am getting the error message "Cannot Open sql server" when i try to
run the report from vb when the 2 options
"Save data with Query" in Crystal SQL Designer
"Save data with report" in crystal report are unchecked
where as when these options are checked no error message but not the
updated data

can any pls. help me to overcome with this problem with code.
i received many solutions but still my problem in not yet solved
Can any one try to explain me where i am going wrong

Thanks & Regards

Abdullateef
Email: email@removed

Copyright © 2005-08 www.BigResource.com, All rights reserved