|
-
May 23rd, 2005, 05:03 PM
#1
Crystal Reports Sorting Issue [Resolved]
I am working on my first CR Report in VB.NET and I have the Viewer on my form and the ReportDocument in the
project. I had created the report earlier with 8.5 Developer.
Now the issue is I need to give the user the option of sorting the report on different fields. It currently has two groupings,
say Field1 and Field2. The sorting is ascending on both fields but they want to sort on a third field as the primary sort but
still retain the grouping display but based on Field3 for the sorting.
Ex.
ClientName
Project Name
Description, Created, Assigned, DaysOld
The option is to be able to show the report in descending order based on the DaysOld (Field3) Field, but still be able to view in
alphabetical order if no sorting is desired.
Also, is there a way to display only the data that the user is drilling down on using the explorer tree of the viewer control?
Last edited by RobDog888; May 24th, 2005 at 10:35 PM.
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 
-
May 23rd, 2005, 06:30 PM
#2
Re: Crystal Reports Sorting Issue
I got the sorting issue worked out by creating a secondary report that is grouped first by the daysold. Added a cbo to the form that
contained both reports. When the user selects one cbo item the viewer reloads that report. If they select the other cbo item then
it reloads with that one.
Next question, what do I need to reference or do before making an installation package?
Also, if I wanted to set the .SetDataSource to an ADO recordset how could I do that? I havent used ADO.NET at all yet.
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 
-
May 23rd, 2005, 08:26 PM
#3
Re: Crystal Reports Sorting Issue
about the .SetDataSource thingy here i created a class that pass the information about your databse.
although it's in C# i know you can convert that to vb.
VB Code:
public void loginreport(SqlConnection cn,ReportDocument rpt)
{
CrystalDecisions.Shared.TableLogOnInfo loginfo;
foreach(CrystalDecisions.CrystalReports.Engine.Table table in rpt.Database.Tables)
{
loginfo=table.LogOnInfo;
loginfo.ConnectionInfo.ServerName=cn.DataSource;
loginfo.ConnectionInfo.DatabaseName=cn.Database;
loginfo.ConnectionInfo.UserID="sa";
loginfo.ConnectionInfo.Password="password";
table.ApplyLogOnInfo(loginfo);
rpt.SetDataSource(cn.DataSource);
}
}
if you're using strongly typed dataset no need to put that one..strongly typed will do the login thingy to your database.
hope it helps.
-
May 23rd, 2005, 08:34 PM
#4
Re: Crystal Reports Sorting Issue
Thanks mar_zim, I see that its still the same as it was in vb6 but how do I connect to my SQL server db? I dont know ad.net at all, only ado vb6.
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 
-
May 23rd, 2005, 08:41 PM
#5
Re: Crystal Reports Sorting Issue
here's the link for the connection thingy. http://www.connectionstrings.com/
-
May 23rd, 2005, 08:55 PM
#6
Re: Crystal Reports Sorting Issue
Umm, I know the connectionstring but how do I set up ADO.NET???
I dont know it so could you start from the first step.
Sorry for havent learned it yet.
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 
-
May 23rd, 2005, 10:30 PM
#7
Re: Crystal Reports Sorting Issue
No need to set up ADO.Net it is already in the framework.
ADO.NET are good for disconnected objects Dataset,Datatable,datacolumn,datarow and it found on System.Data dll.
sorry I can't give you more detailed explanation about ado.net coz im in a process of knowing more of it.
if you want try to buy "Core Reference Microsoft ADO.NET by David Sceppa"
-
May 23rd, 2005, 10:33 PM
#8
Re: Crystal Reports Sorting Issue
Thanks Mar. I will continue to search for some more examples.
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
|