|
-
Oct 22nd, 2005, 02:53 AM
#1
Thread Starter
Hyperactive Member
Query Error In Reprot
Hi
I Am Using Access2000 Database.
Query
------
Select Gen.glname As Glname, Gen.groupc As Groupc, Gen.opbal As Opamt, Sum(txn.amount) As Txnamt, (opamt+nz(txnamt,0)) As Clbal
From Gen Left Join Txn On Gen.glcode=txn.glcode
Group By Gen.glname, Gen.opbal, Gen.groupc;
While Calling This Query In Crystal Error Message Shown -
Odbc Error: [microsoft][odbc Microsoft Access Driver ]
Undefined Function 'nz' In Expression.
Pls Help How To Overcome From This Problem.
Thanks
Asm
-
Oct 22nd, 2005, 03:15 PM
#2
Re: Query Error In Reprot
Looks like you have a valid Access query but if your using it as your CR query source then its not valid as CR doesnt know what nz is. Take your query and save it as an Access query. Then in CVR set that saved query as your datasource.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 11:45 PM
#3
Thread Starter
Hyperactive Member
Re: Query Error In Reprot
I am saved the query in Access than I call in CR for reporting.
asm
-
Oct 23rd, 2005, 11:53 PM
#4
Re: Query Error In Reprot
Did you set it as the data source like in the sql string -
SELECT * FROM Query1
Do you have the report option to show stored procedures? CR looks at Access as stored procedures. What connection technology are you using (ODBC, ADO, DNS)?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 24th, 2005, 05:50 AM
#5
Thread Starter
Hyperactive Member
Re: Query Error In Reprot
same as you give us example
asm
-
Oct 24th, 2005, 02:12 PM
#6
Re: Query Error In Reprot
Change the nz function to an IIF statement. That should solve it.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 26th, 2005, 07:05 AM
#7
Thread Starter
Hyperactive Member
Re: Query Error In Reprot
I Am Using Iif Then #error In Result Pls Guide How To Write The
Statement.
Select Gen.glname As Glname, Gen.groupc As Groupc, Gen.opbal As Opamt, (iif(sum(txn.amount)=' ', Sum(txn.amount),0)) As Txnamt, (opamt+txnamt) As Clbal
From Gen Left Join Txn On Gen.glcode=txn.glcode
Group By Gen.glname, Gen.opbal, Gen.groupc;
Asm
-
Oct 26th, 2005, 10:12 AM
#8
Re: Query Error In Reprot
Looks like your trying to evaluate some value in txn.amount field although it seems its a text field.
VB Code:
'Original
(iif(sum(txn.amount)=' ', Sum(txn.amount),0)) As Txnamt,'
'Determines if field is null
(IIf(txn.amount='', SUM(txn.amount), 0)) As Txnamt,'
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|