Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Column Alias
SasDWH
<p>Hi All,</p>
<p> </p>
<p>I am very new to BIRT, I am preparing a BIRT Report my Requirement is to get the totals of the accounts. so my query looks like </p>
<p> </p>
<p>Select Account_Type, count(1)</p>
<p>from accounts</p>
<p>group by Account_Type</p>
<p>order by Account_Type.</p>
<p> </p>
<p>Account_Type column is integer column which contains the code, but in my Report I need to show the Account_name instead of Account_Type.</p>
<p> </p>
<p>Please help..</p>
<p> </p>
<p>Also tell me where can I search the forum for related old posts.</p>
<p> </p>
<p>Thanks in Advance</p>
<p> </p>
<p>Sas</p>
<p> </p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>This is more a SQL question than a BIRT question...</p>
<p> </p>
<p>Without knowing your database structure, I'll take a shot in the dark. If the account name is in a different table (named below accounts2), then the following select statement should work:</p>
<p> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">SELECT A2.Account_name, count(*)</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">from accounts A1 inner join accounts2 A2 on A1.account_type = A2.account_type</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">group on A2.Account_name</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hope this helps,</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">P.</p>
SasDWH
<p>Hi Pricher,</p>
<p> </p>
<p>Greetings..</p>
<p> </p>
<p>Here I am attaching a PDF and the .rptdesign.</p>
<p> </p>
<p>I am doing the counts on Account Types, so I am taking my acct type as my X-Axis and acct no as count. when I generate the report in X-Axis its showing Acct Type like 1001,1002,1003,1004... instead of acct type there I need acct name like Savings, Current, Loan, CreditCard.....</p>
<p> </p>
<p> </p>
<p>Regards</p>
<p>Sasikiran.V</p>
<p>
pricher
<p>Hi,</p>
<p> </p>
<p>Thanks for sending the PDF, but the report design was not attached. Anyhow, if account_name is part of your data set, simply use account_name on the X-Axis. Unless I am missing something...</p>
<p> </p>
<p>P.</p>