Joined: 27 Mar 2013
Location: United States
Online Status: Offline
Posts: 1
Topic: Group by year and trhe month Posted: 01 Apr 2013 at 7:32am
I have a problem with a Crystal report, it works fine except that the summary data for the months will only show up for for full years. So for 2013 no months will show until 2014.
Thanks in advance.
It groups by the year and then by the month.
//@month month ({GL_Register.Date}) //@year year ({GL_Register.Date})
SELECT "GL_Account"."Account_Code", "GL_Register"."Credit_Or_Debit", "GL_Register"."Amount", "GL_Account"."Description", "GL_Register"."Date", "GL_Accounting_Period"."Description" FROM (("SieversFinal"."dbo"."GL_Register" "GL_Register" INNER JOIN "SieversFinal"."dbo"."GL_Account" "GL_Account" ON "GL_Register"."Account_Id"="GL_Account"."Account_Id") INNER JOIN "SieversFinal"."dbo"."GL_Account_Period" "GL_Account_Period" ON ("GL_Register"."Accounting_Period_Id"="GL_Account_Period"."Accounting_Period_Id") AND ("GL_Register"."Account_Id"="GL_Account_Period"."Account_Id")) INNER JOIN "SieversFinal"."dbo"."GL_Accounting_Period" "GL_Accounting_Period" ON "GL_Account_Period"."Accounting_Period_Id"="GL_Accounting_Period"."Accounting_Period_ID" WHERE "GL_Account"."Account_Code"=N'52420' AND ("GL_Register"."Date">={ts '2007-01-01 00:00:00'} AND "GL_Register"."Date"<{ts '2013-12-31 00:00:01'})
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 03 Apr 2013 at 6:32am
Are you getting the data for the report through a command or is this just the SQL that Crystal is creating for your report? What version of Crystal are you using and what type of database are you connecting to?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum