Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Profit & Loss Summary Report by Class |
Author |
Message |
|
Posted : 2006-07-26 04:12:24 |
Hello. Can give me some direction in writing a query to produce a report that shows the bottom line Profit & Loss number only for each (or a given list of) class? I'm interesting in a simply view that includes basically only the class name and their bottom line number; one row for each class and excluding subclasses... Thank you in advance! |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-07-26 09:53:37 |
If you mean the Net Income (botton line) for each Class.
Then this query will give you the results:
sp_report ProfitAndLossByClass show Text, Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class' where Label='Net Income'
|
|
|
|
|
Posted : 2006-07-27 02:39:12 |
Thanks, this makes sense. Is there any way to list the class and net profit vertically (1 per row) instead of horizontally (across columns) ?? My ideal layout would be the following result set:
Class Net Profit -------- ------------- Class1 $500 Class2 $1000 Class3 $-300
Also - can I use a subquery to dynamically get a list of appropriate classes for my filter clause?? For example:
sp_report ProfitAndLossByClass show Text, Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class', ClassFilterListIDs IN(select ListID from class where sublevel = 0 and IsActive = 1) where Label='Net Income'
If not -- is there any other way to accomplish this as I do not want to include a static list od class ID's but need to filter the query to only active and top level classes?
Thanks! |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-07-27 08:28:14 |
Sorry, you are going a little beyond the scope of this forum here. You cannot run subqueries within a stored procedure, however, you can rename the columns with a static list (or programmed variables) like this:
sp_report ProfitAndLossByClass show Text, Label, Amount_1 as "New Construction", Amount_2 as "Total New Construction", Amount_3 as "Remodel" parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class' where Label='Net Income'
and to do the format layout you wish, you can call the report a number of times for each class like this:
sp_report ProfitAndLossByClass show Text as "New Construction", Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class', ClassFilterFullNameWithChildren='New Construction' where Label='Net Income'
sp_report ProfitAndLossByClass show Text as "Remodel", Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class', ClassFilterFullNameWithChildren='Remodel' where Label='Net Income'
|
|
|
|
|
Posted : 2007-08-04 05:24:39 |
I would like to get the data by Class for multiple months. Something like this:
Account, Class, Amount_1 as "Month 1", Amount_2 as "Month 2", Amount_3 as "Month 3", etc
Basically, I want the Class data in rows and not columns. Is it possible? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-08-04 09:14:10 |
You can do it, but you would need to run the report for each class like this:
sp_report ProfitAndLossbyClass show Text, Label, Amount_1_Title as Month_1, Amount_1, Amount_2_Title as Month_2, Amount_2, Amount_3_Title as Month_3, Amount_3, Amount_4_Title as Month_4, Amount_4, Amount_5_Title as Month_5, Amount_5, Amount_6_Title as Month_6, Amount_6, Amount_7_Title as Month_7, Amount_7, Amount_8_Title as Month_8, Amount_8, Amount_9_Title as Month_9, Amount_9, Amount_10_Title as Month_10, Amount_10, Amount_11_Title as Month_11, Amount_11, Amount_12_Title as Month_12, Amount_12, Amount_13_Title as Total, Amount_13 as Total_Amount parameters DateMacro = 'ThisYear', SummarizeColumnsBy = 'Month', ClassFilterFullNameWithChildren='New Construction' |
|
|
|
|
Posted : 2007-11-10 05:17:51 |
sp_report ProfitAndLossbyClass show Text, Label, Amount_1_Title as Month_1, Amount_1, Amount_2_Title as Month_2, Amount_2, Amount_3_Title as Month_3, Amount_3, Amount_4_Title as Month_4, Amount_4, Amount_5_Title as Month_5, Amount_5, Amount_6_Title as Month_6, Amount_6, Amount_7_Title as Month_7, Amount_7, Amount_8_Title as Month_8, Amount_8, Amount_9_Title as Month_9, Amount_9, Amount_10_Title as Month_10, Amount_10, Amount_11_Title as Month_11, Amount_11, Amount_12_Title as Month_12, Amount_12, Amount_13_Title as Total, Amount_13 as Total_Amount parameters DateMacro = 'ThisYear', SummarizeColumnsBy = 'Month', ClassFilterFullNameWithChildren='New Construction' Using your suggestion, which syntax to use to get ClassFilterFullNameWithChildren? I have class as Store I with sub-class Retail, Catering. If I use 'Store I.Retail' or 'Store I_Retail', the error message that I get state "Column2 not found?
Can do I do the same stored Procedure to get the budget figures by Class? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-11-10 11:25:35 |
Try 'Store I:Retail' and use:
SP_PARAMETERS ProfitAndLossBudgetOverview
or the report you're interested in, to list all the parameters available for use in the report. Often it's better to play with the report you are trying to do using the QuickBooks user interface first. |
|
|
|
|
Posted : 2008-01-30 08:22:34 |
I am trying to run a Profit and Loss by Class, but I only want the detail accounts, none of the totaling rows. Kind of like the P&L side of a Trial Balance, but by class. I am using account numbers, which are in the Label field. I did use a where Label is not null, which stripped out some of the rows, but I still have ones that start with Total and Net Income at the bottom. Is there a way to have a multiple where statement to not include anything in which Label is null or Label starts with Total or Label starts with Net? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-01-30 11:39:34 |
For just the Data rows of a report just use:
sp_report ProfitAndLossByClass show Label, Amount parameters DateMacro = 'ThisYearToDate', SummarizeColumnsBy = 'Class' where RowType = 'DataRow' |
|
|
|
|