SCCM report/query w/ multiple subcollections
I am responsible for multiple work centers for SCCM. For part of my job I need to pull reports for patches that show who has and does not have specific patches or updates. Currently I have to run the same report multiple times to gather
the data. I know I could consolidate the collections but that would not allow me to show the work centers the problems I need them to fix for manual remediation. I could really use some help with a custom report.
example layout
company(upper collection)
analytics (sub collection)
security (sub collection)
helpdesk (sub collection)
I need a report that will show me not only the standard installed /required data but also the subcollection that machine is in.
Can I run a report against the upper collection and either drill down into the sub collections or at least have it show the sub collection name so I can task out work needed?
machine name analytics
what do you have so far? you indicated you run the same report multiple times. Can you post what that one is? It might be (sort of) easy to modify to include details about specific collection memberships--but in order to do that we'll
have to see what you have so far.
Standardize. Simplify. Automate.
Similar Messages
-
SCCM report query that displays count of cpus per host and if host is physical or virtual
Hello,
I have this query that displays the count of CPUs per host. How can I add a column to show if the host a physical or virtual?
SELECT
DISTINCT(CPU.SystemName0) AS [System Name],
CPU.Manufacturer0 AS Manufacturer,
CPU.Name0 AS Name,
COUNT(CPU.ResourceID) AS [Number of CPUs],
CPU.NumberOfCores0 AS [Number of Cores per CPU],
CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM [dbo].[v_GS_PROCESSOR] CPU
GROUP BY
CPU.SystemName0,
CPU.Manufacturer0,
CPU.Name0,
CPU.NumberOfCores0,
CPU.NumberOfLogicalProcessors0I see that you have posted this exact question in another forum for CM12, however this is an CM07 forum.
Are you CM07 or CM12?
If you are CM12, use my answer here.
http://www.systemcentercentral.com/forums-archive/topic/sccm-report-query-for-cpu-cores/
If you are CM07, this is NOT a simple how exactly do you detect that a computer is a VM? You can guess by looking at the manufacturer name but it is only a guess.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
Report query with multiple selects
On some of my Report Queries (that have multiple selects) it sometimes changes the rowset when I edit the specific SQL.
For example, I have 2 selects in my Report Query andnd when I download the XML my first select’s data goes into <ROWSET1> and my second select’s data goes into <ROWSET2>. I then make my template and everything is good.
But, sometimes when I edit the SQL in the report it changes the ROWSET number of the data so now my first select’s data in ROWSET2. This blows up the report. Is this a bug? Why is it switching the rowsets back and forth?I'm referring to the Report queries under shared components.
My first query is like this:
select A.emp_id
from tab1 AC4, tab2 AC3, tab3 AC2, tab4 AC1, tab5 A
where A.year = :page_year
and C.FK_SCHOOL IN (SELECT c001
FROM apex_collections AC1
WHERE AC1.collection_name = 'SIS_REPORTS_SCHOOLS')
and nvl(C.ACTIVE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C.ACTIVE,'NONE'),C001)
FROM apex_collections AC2
WHERE AC2.collection_name = 'SIS_REPORTS_ACTIVES')
and nvl(C5.CALENDAR_NO,'NONE') IN (SELECT decode(c001,'NONE',nvl(C5.CALENDAR_NO,'NONE'),C001)
FROM apex_collections AC3
WHERE AC3.collection_name = 'SIS_REPORTS_SCHOOL_CALENDAR_NOS')
and nvl(C10.CLUSTER_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C10.CLUSTER_CODE,'NONE'),C001)
FROM apex_collections AC4
WHERE AC4.collection_name = 'SIS_REPORTS_CLUSTER_CODES')
My second query needs to select the detail info from other tables, but I only want to do it for the (master) records that were returned in the first query. -
Is there a way to pass an array or structure for example as parameters, in addition to a query, or multiple queries to the Report Builder in CF8? I believe this was recommended by users to be in CF8.
BrianO,
Although it's been a while, I thought I'd provide the code to do this for you. It works for me in CF8, and probably will in CF7.
Here I create a structure called My, and provide that one parameter to my CFReportParam tag.
<CFSet My = {
Client = "Client Name",
ReportDateFrom = DateFormat(ThisStartDate, DateMask),
ReportDateTo = DateFormat(ThisEndDate, DateMask),
PageHeaderImage = ImagePath & "\Logos\Page_Header.png",
WatermarkImage = ImagePath & "\Logos\Watermark.png",
GetBarSummary = GetBarSummary,
GetPieSummary = GetPieSummary
}>
<CFReport Template="#ReportPath#\SpendSummary.cfr" Format="PDF" Query="GetSummary">
<CFReportParam Name="My" Value="#My#">
</CFReport>
Inside the report itself, reference the given parameter as Param.My.PageHeaderImage for example. It can be referenced that way from any expression inside the report builder. You can even use the queries as the data source for charts (using the Data From a Query -> Query Builder -> Advanced) by entering "Param.My.GetPieSummary" where it says "Variable containing query object".
HTH
Swift -
SCCM Report for Applicable and Installed Updates Collection Wise
Hi All, I was looking for a report on Applicable and Installed Updates Collection Wise and got this below query on the Internet and want to create a SCCM report with this below query. How to make this query working in SCCM report?
Do I need to add prompts, if yes please guide me on adding prompts.
SELECT
DISTINCT
SYS.Name0
AS [Server Name], SIS.SMS_Installed_Sites0 AS [Site Code], UCS.Status AS [Patch Status Code],
CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status', UI.BulletinID AS [Bulletin ID],
UI
.ArticleID AS [Article ID], UI.
Title
FROM
v_R_System AS SYS LEFT OUTER
JOIN
v_Update_ComplianceStatusAll
AS UCS ON SYS.ResourceID = UCS.ResourceID INNER
JOIN
v_UpdateInfo
AS UI ON UCS.CI_ID = UI.CI_ID INNER
JOIN
v_RA_System_SMSInstalledSites
AS SIS ON SYS.ResourceID = SIS.
ResourceID
WHERE
(UCS.Status IN ('2', '3')) AND (UI.ArticleID IN ('972270', '974392', '973904', '969947')) AND (SYS.Name0
IN
(SELECT DISTINCT v_FullCollectionMembership.
Name
FROM v_FullCollectionMembership INNER
JOIN
v_R_System
ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
v_FullCollectionMembership
.CollectionID IN ('Collection ID'
ORDER
BY
[Patch Status Code]Yes it can be done and please run the query which i have shared in the thread
I again pasted the query for you below..
SELECT DISTINCT
SYS.Name0 AS [Server Name], CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status',
UI.BulletinID AS [Bulletin ID], UI.ArticleID AS [Article ID], UI.Title
FROM v_R_System AS SYS LEFT OUTER JOIN
v_Update_ComplianceStatusAll
AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
v_UpdateInfo AS UI ON UCS.CI_ID
= UI.CI_ID
WHERE (UCS.Status IN ('2', '3')) AND (SYS.Name0 IN (SELECT DISTINCT v_FullCollectionMembership.Name
FROM v_FullCollectionMembership INNER JOIN
v_R_System ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
v_FullCollectionMembership.CollectionID
IN ('XXX00000')))
Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights -
Performance issues when creating a Report / Query in Discoverer
Hi forum,
Hope you are can help, it involves a performance issues when creating a Report / Query.
I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = Posted we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
Please see attached the SQL Inspector Plan:
Before Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
AND-EQUAL
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_N1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
After Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
TABLE ACCESS FULL GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
Many thanks,
LanceHi Rod,
I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
Ive been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
I think the problem is with the column using DECODE. When querying the column in TOAD the value of P is returned. But in discoverer the condition is done on the value Posted. Im not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
Lance
DECODE( JOURNAL_BATCH1.STATUS,
'+', 'Unable to validate or create CTA',
'+*', 'Was unable to validate or create CTA',
'-','Invalid or inactive rounding differences account in journal entry',
'-*', 'Modified invalid or inactive rounding differences account in journal entry',
'<', 'Showing sequence assignment failure',
'<*', 'Was showing sequence assignment failure',
'>', 'Showing cutoff rule violation',
'>*', 'Was showing cutoff rule violation',
'A', 'Journal batch failed funds reservation',
'A*', 'Journal batch previously failed funds reservation',
'AU', 'Showing batch with unopened period',
'B', 'Showing batch control total violation',
'B*', 'Was showing batch control total violation',
'BF', 'Showing batch with frozen or inactive budget',
'BU', 'Showing batch with unopened budget year',
'C', 'Showing unopened reporting period',
'C*', 'Was showing unopened reporting period',
'D', 'Selected for posting to an unopened period',
'D*', 'Was selected for posting to an unopened period',
'E', 'Showing no journal entries for this batch',
'E*', 'Was showing no journal entries for this batch',
'EU', 'Showing batch with unopened encumbrance year',
'F', 'Showing unopened reporting encumbrance year',
'F*', 'Was showing unopened reporting encumbrance year',
'G', 'Showing journal entry with invalid or inactive suspense account',
'G*', 'Was showing journal entry with invalid or inactive suspense account',
'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
'I', 'In the process of being posted',
'J', 'Showing journal control total violation',
'J*', 'Was showing journal control total violation',
'K', 'Showing unbalanced intercompany journal entry',
'K*', 'Was showing unbalanced intercompany journal entry',
'L', 'Showing unbalanced journal entry by account category',
'L*', 'Was showing unbalanced journal entry by account category',
'M', 'Showing multiple problems preventing posting of batch',
'M*', 'Was showing multiple problems preventing posting of batch',
'N', 'Journal produced error during intercompany balance processing',
'N*', 'Journal produced error during intercompany balance processing',
'O', 'Unable to convert amounts into reporting currency',
'O*', 'Was unable to convert amounts into reporting currency',
'P', 'Posted',
'Q', 'Showing untaxed journal entry',
'Q*', 'Was showing untaxed journal entry',
'R', 'Showing unbalanced encumbrance entry without reserve account',
'R*', 'Was showing unbalanced encumbrance entry without reserve account',
'S', 'Already selected for posting',
'T', 'Showing invalid period and conversion information for this batch',
'T*', 'Was showing invalid period and conversion information for this batch',
'U', 'Unposted',
'V', 'Journal batch is unapproved',
'V*', 'Journal batch was unapproved',
'W', 'Showing an encumbrance journal entry with no encumbrance type',
'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
'X', 'Showing an unbalanced journal entry but suspense not allowed',
'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
'Z', 'Showing invalid journal entry lines or no journal entry lines',
'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ), -
Scheduled Report - Bug with Multiple Selection LOV parameter
Problem:
I have a scheduled report with a parameter that has it's "Multiple Selection" checkbox checked. I schedule the report with multiple values selected. When I receive the report via email, the report ran as if I only selected one LOV value instead of multiple values.
Facts:
1) Enterprise version 10.1.3.2.1
2) When you run the report manually with multiple values selected in the LOV, it runs great with the correct dataset.
3) This scheduled report does not have a Data Template.
James
P.S. - I searched this forum for other treads on this issue. I didn't find any. Sorry if this is a duplicate.I have this same problem, too.
When I select multiple parameters on the "View" screen for a given report, everything works fine.
When I schedule it, however, only the last parameter I clicked on (regardless of whether a select a range or multiple individual values) is passed to the query. The other selections I make are ignored.
What gives? Am I doing something wrong? Is this a bug? Is there a workaround? -
Report Query - XML data source empty
Hello!
I built a report query, using the wizard, under Shared Components and when I test the query using bind variables I get the correct data, but as I click Apply Changes and get to the screen where it gives me the option to Download the data source for the report layout, the file is empty. I've repeated the steps multiple times, each time getting correct data when testing the query, yet nothing in my xml file.
Any ideas on why this is happening?
Thank you.Hello! Thank you for responding!
I actually am having problems on the "Report Queries" section under "Shared Components"...my query doesn't return any data when I try to download/open the xml file. Once I'm able to get this fixed, I'll be able to open my report on the page that has the branch. -
I need to create an SCCM report to show last logged on user on all machines and the Active Directory department attribute of that last logged on user.
You problem is here.
right
join v_R_User USR on USR.ResourceID
= CS.ResourceID
USR.ResourceID != CS.ResourceID, you need to map the username to the user logon to the PC. By using the user’s department information you will
end up with unreliable results.
Anyways you need to make these changes to your query.
left
join v_R_User USR on USR.Unique_User_Name0
= CS.UserName0
http://www.enhansoft.com/ -
Doubt in Firing Query with multiple opportunities UUID/IDs
HI Folks!
I might have simple doubt but please help me on this!
1. I have a custom BO with association to opportunities.
[DeploymentUnit(CustomerRelationshipManagement)] businessobject Sy_Trade {
[AlternativeKey] [Label("Trade Id")] element tradeid : BusinessTransactionDocumentID;
node RelatedOpportunities [0,n]{
element BusinessTransactionDocumentReference : BusinessTransactionDocumentReference;
element BusinessTransactionDocumentRelationshipRoleCode : BusinessTransactionDocumentRelationshipRoleCode;
association RelatedOpportunity[0,1] to Opportunity;
2. I have success fully used association and i am able to view create all the opportunities related to my custom Bo.
ISSUE : I want a facet where i just want DISPLAY the activities and sales document assigned in the RELATED OPPORTUNITIES ( N opportunities )
How do i query with Multiple opportunities ID and fetch the activities against it?
Btw I want to use query in UI Designer... I have created an advanced list pane and there i want the result list
I hope i am clear!
Thanks in adavance...
Regards
DhruvinHi Ludger,
I have successfully displayed Related Opportunities associated with trade.( i am able to create , delete also )
Issue : I am not able to "Display" ( i don't need to edit or create ) all the activities created against all the opportunities in a different tab.
I tried to approaches :
1: Query : Created a Query on Activity BO and tried to pass multiple related opportunities ( but seems not possible , please tell me any possibility to pass range of opportunity via transformation or anything? )
2 : binding : I have a Node Related Opportunity so just tried to bind it with BO model but problem is it is displaying all the activities of first opportunity of the list...
i think why because :
In Data model I have created a table bind with Related Opportunities...
now that node is 1 to N , association to opportunity 0 to 1 , hence i think it fetches only 1 opportunities activity
should i create like below ( Or is it possible)
Node Reltdoppts[0,1]
association [0,N] to opportunity BO ?
Although i strongly feel SAP should provied us two things :
1. We need to pass range of opportunities in a query.
2. We need to just write some absl code where i can fill the table and display it
and also is there any possibility to create a report or something to display activities as we just want to display the activities!
P.S : I have been getting a lot of bashing from client because some of the product restriction in cloud! i hope and wish SAP give developers free hand to develop right now its like our hands are tied to many things -
Hello,
I am looking for a 2007 SCCM custom query that will look for KB2964358 installed. My trouble lies when I specify the below query to see if an update is installed, and it only returns XP computers since it is looking for the ADD Remove Programs feature.
ConfigMgr is not collecting the list of Software Updates (patches) for Window 7/Vista/ 2008/ 2008 Core operating systems. Because, on these operating systems this information is stored
in “Win32_QuickFixEngineering” WMI class (it’s not listed in Add Remove Programs) and the inventory of this class is NOT enabled in SMS_DEF.MOF (by def ault). Hence ConfigMgr. report won’t be able to provide these details unless and until you’ve enabled
the appropriate WMI class in SMS_DEF.MOF. Is there any other way to look for an update installed in custom queries that will return Windows 7 machines as well?
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID
= SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%KB2964358%"Hi,
take a look at the article below to extend the SMS_DEF.mof file to include the WMI class.
http://technet.microsoft.com/en-us/library/cc180866.aspx
Blog: http://theinfraguys.com
Follow me at Facebook
The Infra Guys Facebook Page
Please remember to click Mark as Answer on the answer if it helps you in anyway -
Shared Components APEX Report Query and Layout
Does anyone know how to call the report query and layout from the Shared components section from a page within the application?
mtbdude40 wrote:
What I need is this: The ability to create a PDF report with a custom header defining the data (example - select * from emp where deptno = :deptno and the header includes the department name).
I use this white paper as my source: http://www.oracle.com/technetwork/developer-tools/apex/learnmore/custom-pdf-reports-1953918.pdf
You need to build and use a Shared Resource -> Report Queries.
The Report Query will have two queries associated with it (see below).
one query will be for the header information, the other will be for the data.
use the "download" of the "xml data" as your source for Altova/other tools.
If you add/remove/change queries, You'll have to redo your report (from scratch) as that changes the XML Schema required. (at least, with my experience)
Once you get the hang of it, 2x queries is easy (Header, data)
I've experimented with 3x queries (header, master,details) but have been unsuccessful. I have some ideas though ("link" master->detail info via XPath stuff within Altova) but haven't gotten around to testing it.
If you want to run the report for multiple departments....That might require some finesse.
Unfortunately, the Source of the Queries can't be a scalar SQL that returns 1 row of 1 column of data type XMLType....
MK -
Call to predefined Report Query for PDF download does nothing
I am trying to download a PDF report which is based upon 2 queries. Each query has a where clause with values taken from page items. I have installed OBI Publisher 11.1.1.5 and used the OBI Publisher 11.1.1.5 Word plug-in to create the RTF file that I then uploaded to the Shared Components->Report Layout.
I created a new region button to call the Report Query. However, whenever I click on the button to download the PDF, nothing happens. I have looked at the debug and the button appears to be executing OK, except that nothing happens.
The APEX to OBIP configuration is working since I am able to have OBIP generate other report PDFs that aren't using the predefined query. Stated a bit differently, reports regions that have the Print Attributes set to "Enable Report Printing=Yes" and "Report Layout=Default Report Layout" work fine. Reports based upon the predefined query and launched using a region button do not do anything.
Environment: APEX 4.1, DB 11.2.0.2, OBIP 11.1.1.5
Any help with this PDF issue is greatly appreciated.
Thanks,
ReidThank you again for your reply, Udo.
Here are my responses:
* As a matter of fact, I am doing a copy / paste from the predefined query to the report region source.
** What exactly do you mean by that? Don't you print the actual region?
I need to produce a PDF that is the compilation of 4-5 queries. Therefore, I cannot print a region to PDF since APEX (as far as I know) does not allow for the printing of multiple regions (1 query per region) to a single PDF file. So, I am creating a PDF that is based upon multiple queries which I predefine in the shared components -> report queries. Then, I'm creating a region button that calls a downloadable report when it is clicked.
Your question has made me realize that indeed it doesn't matter what query I have in the report region since I am calling a predefined report. When nothing was happening when I attempted to generate the PDF, I guess I started to think that the problem was with the queries on the page and so I made them match exactly with what the queries are in the shared components->report queries.
Please advise if something is wrong with my understanding here.
I checked the OBI Publisher logs (at least what I could locate) and I didn't see anything show up there.
/u02/app/ohs/obip_mw/user_projects/domains/bifoundation_domain/servers/AdminServer/logs
I checked the OHS access_log and I didn't see anything that looks like an error. I also don't see anything in the APEX page debug. It appears to process normally when the button is clicked.
From the access_log:
192.168.1.137 - APEX_PUBLIC_USER [27/Dec/2011:22:17:30 -0500] "GET /pls/apex/f?p=4000:RUN_PAGE:55206340610065:BRANCH_TO_PAGE_ACCEPT:NO::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW:103,235,103 HTTP/1.1" 302 -
192.168.1.137 - APEX_PUBLIC_USER [27/Dec/2011:22:17:30 -0500] "GET /pls/apex/f?p=103:235:55206340610065::::: HTTP/1.1" 200 21588
192.168.1.137 - APEX_PUBLIC_USER [27/Dec/2011:22:17:32 -0500] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 302 -
192.168.1.137 - APEX_PUBLIC_USER [27/Dec/2011:22:17:32 -0500] "GET /pls/apex/f?p=103:235:4495899155137965::::: HTTP/1.1" 200 21588
Here is a look at the page debug:
0.00246 0.00107 A C C E P T: Request="TRANSCRIPT_PDF" 4
0.00350 0.00501 Metadata: Fetch application definition and shortcuts 4
0.00851 0.00080 alter session set nls_language="AMERICAN" 4
0.00931 0.00060 alter session set nls_territory="AMERICA" 4
0.00991 0.00078 NLS: CSV charset=WE8MSWIN1252 4
0.01069 0.00067 ...NLS: Set Decimal separator="." 4
0.01136 0.00083 ...NLS: Set NLS Group separator="," 4
0.01219 0.00082 ...NLS: Set g_nls_date_format="DD-MON-RR" 4
0.01301 0.00079 ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM" 4
0.01380 0.00077 ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR" 4
0.01457 0.00064 ...Setting session time_zone to -05:00 4
0.01522 0.00077 Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY HH:MIPM 4
0.01599 0.00094 Setting NLS_TIMESTAMP_FORMAT to application timestamp format: DD-MON-YYYY HH:MIPM 4
0.01693 0.00077 ...NLS: Set g_nls_date_format="DD-MON-YYYY HH:MIPM" 4
0.01770 0.00078 ...NLS: Set g_nls_timestamp_format="DD-MON-YYYY HH:MIPM" 4
0.01848 0.00068 ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR" 4
0.01916 0.00046 NLS: Language=en-us 4
0.01962 0.00219 ...metadata, fetch translated application info 4
0.02181 0.00088 ...fetch session state from database 4
0.02269 0.00096 fetch items 4
0.02365 0.00090 ...fetched 32 session state items 4
0.02455 0.00170 Authentication check: CUSTOM TABLE AUTH (NATIVE_CUSTOM) 4
0.02625 0.00074 ... sentry+verification success 4
0.02698 0.00057 ...Session ID 4495899155137965 can be used 4
0.02755 0.00056 ...Check session 4495899155137965 owner 4
0.02811 0.00064 Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY HH:MIPM 4
0.02875 0.00080 Setting NLS_TIMESTAMP_FORMAT to application timestamp format: DD-MON-YYYY HH:MIPM 4
0.02955 0.00062 ...NLS: Set g_nls_date_format="DD-MON-YYYY HH:MIPM" 4
0.03017 0.00069 ...NLS: Set g_nls_timestamp_format="DD-MON-YYYY HH:MIPM" 4
0.03086 0.00053 ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR" 4
0.03139 0.00130 ...Check for session expiration: 4
0.03269 0.00055 ...Metadata: Fetch Page, Computation, Process, and Branch 4
0.03323 0.00102 Session: Fetch session header information 4
0.03425 0.00047 ...Setting session time_zone to -5:00 4
0.03472 0.00187 ...metadata, fetch page info 4
0.03660 0.00092 ...Validate item page affinity. 4
0.03751 0.00050 ...Validate hidden_protected items. 4
0.03801 0.00061 ...Check authorization security schemes 4
0.03862 0.00095 Session State: Save form items and p_arg_values 4
0.03957 0.00081 ...Session State: Save "P235_TRANSCRIPT_ID" - saving same value: "7" 4
0.04038 0.00065 Processes - point: ON_SUBMIT_BEFORE_COMPUTATION 4
0.04102 0.00082 Branch point: Before Computation 4
0.04185 0.00054 Computation point: After Submit 4
0.04239 0.00079 Tabs: Perform Branching for Tab Requests 4
0.04317 0.00065 Branch point: Before Validation 4
0.04382 0.00111 Validations: 4
0.04493 0.00165 Perform basic and predefined validations: 4
0.04658 0.00070 Perform custom validations: 4
0.04728 0.00054 Branch point: Before Processing 4
0.04782 0.00057 Processes - point: AFTER_SUBMIT 4
0.04839 0.00054 Branch point: After Processing 4
0.04893 0.00096 ...Evaluating Branch: AFTER_PROCESSING type: "REDIRECT_URL" button: (No Button Pressed) branch: (Unconditional) 4
0.04989 0.00071 Stop APEX Engine detected 4
0.05059 0.00055 Stop APEX Engine detected 4
0.05114 0.00122 Final commit 4
0.05236 - End Page Processing -
Implementing Interactive Reports Sorts in Report Query
My users love how the Interactive Reports work, especially being able to choose their sort fields. I have an Report Query that can use multiple sorts and many sort fields (chose from APEX page). Is it possible to implement this type of thing in the Report Query (without using decodes or dynamic SQL).
I looked at the code being executed by Interactive Reports and can see the order by changing
select
null as apxws_row_pk,
"CODE",
"CITY_NAME",
"STATE_CODE",
"PK_ID",
count(*) over () as apxws_row_cnt
from (
select * from (
select "PK_ID",
"CODE",
"CITY_NAME",
"STATE_CODE"
from "#OWNER#"."ZIP"
) r
) r where rownum <= to_number(:APXWS_MAX_ROW_CNT)
order by "CODE"Ben, Not sure I follow.
I'm passing in the column names of the order by's from my APEX page to the DB function. Right now I'm doing a huge case statement for each one.
FUNCTION get_student_demographic (l_user in varchar2,
l_owner in varchar2,
l_report_order1 in varchar2,
l_report_order2 in varchar2,
l_report_order3 in varchar2,
l_report_order4 in varchar2,
SELECT (CASE l_report_order1
WHEN '%null%' THEN ''
WHEN 'LAST_NAME' THEN A.LAST_NAME
WHEN 'FIRST_NAME' THEN A.FIRST_NAME
..... many more
ELSE ''
END ) report_order1, -
Hi,
I am new to SCCM reports and all I want to find is the MAC address, System Name and System Serial Number. I need to do this by either collection or IP subnet but cannot seem to get the code correct. I have the following so far:
SELECT
a.Hardware_ID0 as [MAC Address],
a.Netbios_Name0 as [System Name],
b.serialnumber0 as [System S/No]
FROM v_r_system a,
v_gs_pc_bios b
WHERE a.ResourceID = b.ResourceID
This gets all the information required but it is for our whole estate and like i said I need to get it for a collection or IP subnet. Can someone please help?
regards
KevinHow about below Report query: which gives you mac address and hostname list:
Select
v_R_System.Netbios_Name0, SYS.User_Name0,
v_RA_System_MACAddresses.MAC_Addresses0
from
v_R_System, v_R_System SYS, v_RA_System_MACaddresses,
v_fullcollectionmembership
where
v_ra_system_macaddresses.resourceid=v_r_system.resourceid
and v_fullcollectionmembership.resourceid=v_ra_system_macaddresses.resourceid
and SYS.resourceid=v_r_system.resourceid
Maybe you are looking for
-
July TechNet Guru Winners Announced
Below are the results for last month's Guru Competition - TechNet Guru Awards, July 2014 The full version can be found here: http://blogs.technet.com/b/wikininjas/archive/2014/08/19/the-microsoft-technet-guru-awards-july-2014.aspx We can only show th
-
[SOLVED] Reflector cannot retrieve mirror data
Hey guys, I've had a look around but I can't seem to find much on this. When running sudo reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist.bak I'm getting error: failed to retrieve mirror data: <urlopen error [Errno 111] Connectio
-
Are others having this problem????
I know this is a discussion board, but this is a real issue for me and others I have spoken with- I love the phone it is great, the only problem I have is that the ringers are just not LOUD enough-I have all the settings correct and to the max. I hav
-
Can i use the oralce9ias listener to connect to oracle8.1.7 database
Due to my oracle8.1.7 listener process doesn't work and My oracle9ias listener process is right,I have tried to connect oracle8.1.7 database by starting oracle9ias listener process ,It is unlucky for me. How can i solve this problem?
-
Error reusing function with textfield
I'm trying to reuse one of my function that contains a textfield and it's giving me and error on the second time using the formatLink function.. Below is my code: //import classes import com.greensock.TweenLite; import com.greensock.easing.*; import