Click here to Skip to main content
15,916,091 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Delete Key Doesnt Work in fields Pin
Muntyness30-Oct-06 4:50
Muntyness30-Oct-06 4:50 
AnswerRe: Delete Key Doesnt Work in fields Pin
OldWarhorse31-Oct-06 1:31
OldWarhorse31-Oct-06 1:31 
GeneralRe: Delete Key Doesnt Work in fields Pin
Muntyness31-Oct-06 3:14
Muntyness31-Oct-06 3:14 
GeneralRe: Delete Key Doesnt Work in fields Pin
Muntyness31-Oct-06 3:25
Muntyness31-Oct-06 3:25 
GeneralRe: Delete Key Doesnt Work in fields Pin
OldWarhorse31-Oct-06 13:30
OldWarhorse31-Oct-06 13:30 
QuestionNero SDK with VB 6.0 Pin
harry_tan29-Oct-06 22:16
harry_tan29-Oct-06 22:16 
AnswerRe: Nero SDK with VB 6.0 Pin
Dave Kreskowiak30-Oct-06 3:49
mveDave Kreskowiak30-Oct-06 3:49 
QuestionGetting Problem if not Debugging? Pin
aloksingh200629-Oct-06 20:07
aloksingh200629-Oct-06 20:07 
Hi all
I am creating a crystal report and the Problem is that when i debug the same program i get my Result But when i didnot debug and execute directly i am not getting required result.

!!kindly Help me. Where is the Problem
I have written my code.

Dim SqlStr As String
SqlStr = " Select * from tmp"
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenDynaset)
If Rs1.RecordCount <> 0 Then
Do While Rs1.EOF <> True
Rs1.Delete
Rs1.MoveNext
Loop
End If
Set Rs1 = Nothing
SqlStr = "SELECT SalesMaster.`INvcNo`, SalesTrans.`Item`, SalesTrans.`Company`, SalesTrans.`Design`, SalesTrans.`Shade`, SalesTrans.`Qty`, SalesTrans.`MRP`, SalesTrans.`DicsAmt`, SalesTrans.`Amount`" & _
" From `SalesMaster` SalesMaster INNER JOIN `SalesTrans` SalesTrans ON " & _
" SalesMaster.`INvcNo` = SalesTrans.`InvcNo`" & _
" Where SalesMaster.`INvcNo` = " & txtInvoice.Text
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenDynaset)
SqlStr = "Select * from tmp"
Set Rs2 = Db.OpenRecordset(SqlStr, dbOpenDynaset)

If Rs2.RecordCount <> 0 Then
Rs2.Edit
ItmStatus = "M"
Else
ItmStatus = "N"

Do While Rs1.EOF <> True
Rs2.AddNew
Rs2!INvcNo = Rs1!INvcNo
Rs2!Item = Rs1!Item
Rs2!Company = Rs1!Company
Rs2!Design = Rs1!Design
Rs2!Shade = Rs1!Shade
Rs2!Qty = Rs1!Qty
Rs2!MRP = Rs1!MRP
Rs2!DicsAmt = Rs1!DicsAmt
Rs2!Receiptno = ""
Rs2!Type = "Invoice Detail"
Rs2!Amount = Rs1!Amount
Rs2.Update
Rs1.MoveNext
Loop
End If


Set Rs1 = Nothing


SqlStr = " SELECT SalesMaster.`INvcNo`, Receiptmast.`Receiptno`, Receiptmast.`RAmount`, Receiptmast.`Party`, Receiptmast.`RDate` " & _
" From `SalesMaster` SalesMaster INNER JOIN `Receiptmast` Receiptmast ON " & _
" SalesMaster.`INvcNo` = Receiptmast.`InvoiceNo` " & _
" where SalesMaster.`INvcNo` = " & txtInvoice.Text
Dim sum As Single
Set Rs1 = Db.OpenRecordset(SqlStr, dbOpenSnapshot)
Do While Rs1.EOF <> True
Rs2.AddNew
Rs2!INvcNo = Rs1!INvcNo
Rs2!Item = ""
Rs2!Company = ""
Rs2!Design = ""
Rs2!Shade = ""
Rs2!Qty = ""
Rs2!MRP = ""
Rs2!DicsAmt = ""
Rs2!Receiptno = Rs1!Receiptno
Rs2!Type = "Recipt"
Rs2!Amount = Rs1!RAmount
sum = sum + Rs1!RAmount
Rs2.Update
Rs1.MoveNext

Loop
SqlStr = " SELECT " & _
"SalesMaster.`INvcNo`, SalesMaster.`Date`, SalesMaster.`TotAmt`, SalesMaster.`VAT`, SalesMaster.`Gtotal`, " & _
"tmp.`Item`, tmp.`Company`, tmp.`Design`, tmp.`Shade`, tmp.`Qty`, tmp.`MRP`, tmp.`Type`, tmp.`Receiptno`, tmp.`Amount`" & _
"From" & _
"`SalesMaster` SalesMaster INNER JOIN `tmp` tmp ON " & _
"SalesMaster.`INvcNo` = tmp.`INvcNo`" & _
"where SalesMaster.`INvcNo`=" & txtInvoice.Text

CrystalReport1.SQLQuery = SqlStr
CrystalReport1.Formulas(0) = "Party_name = '" & TxtParty.Text & "' "
CrystalReport1.WindowWidth = 5000
CrystalReport1.Formulas(1) = "Start_dt = '" & Format(DTPickerS, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(2) = "End_dt = '" & Format(DTPickerE, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(3) = "Today_dt = '" & Format(DTPickerT, "dd/mmm/yy") & "' "
CrystalReport1.Formulas(4) = "Invoice_no = '" & txtInvoice.Text & "' "
CrystalReport1.Formulas(5) = "Sum_Receipt = '" & sum & "' "
CrystalReport1.ReportFileName = App.Path & "\Reports\tmp.rpt"

CrystalReport1.Action = 1






Withe Regards
Alok Singh

AnswerRe: Getting Problem if not Debugging? Pin
Dave Kreskowiak30-Oct-06 3:52
mveDave Kreskowiak30-Oct-06 3:52 
Questionconversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 19:46
Subjugate29-Oct-06 19:46 
AnswerRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 20:19
shreekar29-Oct-06 20:19 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 21:00
Subjugate29-Oct-06 21:00 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 21:28
shreekar29-Oct-06 21:28 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 22:36
Subjugate29-Oct-06 22:36 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 22:51
shreekar29-Oct-06 22:51 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 22:57
Subjugate29-Oct-06 22:57 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 23:48
shreekar29-Oct-06 23:48 
AnswerRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Software_Guy_12330-Oct-06 21:52
Software_Guy_12330-Oct-06 21:52 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate2-Nov-06 14:41
Subjugate2-Nov-06 14:41 
Questionget height of detail section in crystal report Pin
aparna.shukla129-Oct-06 19:18
aparna.shukla129-Oct-06 19:18 
Questionhow to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells29-Oct-06 19:02
campbells29-Oct-06 19:02 
AnswerRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
Are Jay29-Oct-06 19:18
Are Jay29-Oct-06 19:18 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells29-Oct-06 19:38
campbells29-Oct-06 19:38 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
Are Jay30-Oct-06 4:08
Are Jay30-Oct-06 4:08 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells8-Nov-06 17:42
campbells8-Nov-06 17:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.