When I should use before report and when i should use after report in oracle xml publisher? - oracle

What is the difference between using a before report and after report in xml publisher?, I don't understand when i should use the specific trigger.

It is exactly as the name describes.
The beforeReport trigger is executed before the report is called. For example you might use this to set profile context that is required to call an API or interface program.
The afterReport trigger runs after the report is executed. This is useful, again as an example, to call to bursting program to email the report after it has been created.

Related

Is it possible to validate all SQL expressions in application?

When importing project, there are a lot of bad table names referenced from application, which causes errors. I need to manually rename or create tables accordingly. It would be fine if i find all bad SQL expressions in application with simple few clicks.
How to validate all SQL expressions from pages content body, pages items, etc. to see at what places there are errors?
EDIT:
Here: Table SAMPLE$PROJECT_TASKS does not exist and was not find by Advisor.
Use Advisor. It is located in application's Utilities.
For example:
I created a table named brisime
then I created an interactive report based on that table (it worked OK)
went to SQL Workshop and dropped the table
interactive report doesn't work any more (of course it doesn't)
So, what does the Advisor say? I included only "Is valid SQL or PL/SQL code":
The result is then:
As expected; table doesn't exist, and Advisor found it.
[EDIT]
As of your comment that chart's series query isn't checked by the Advisor: I don't know why - maybe you should ask people who developed Apex (visit OTN Forums).
However, just for testing purposes, I created a page that has two regions:
chart
classic report
Both used the same table as a source. I then dropped the table and ran the page in Debug mode. It shows two separate debug identifiers
chart uses ajax plugin path
classic report uses show path
The Advisor says that report failed on "Is Valid SQL or PL/SQL Code" check, but nothing for the chart. Maybe it is about Ajax, i.e. it isn't checked. On the other hand, maybe it is not the reason, I really can't tell.

BIRT - onCreate script not running

I have a report designed in BIRT 2.3.0 using dynamic columns generation.
The report has open, fetch and beforeOpen script for different sections that initialize the column headers and values, and some onCreate script replacing the column headers and values according to some value suffix.
Running this report with RunAndRenderTask method is working fine.
When running separately, with RunTask and RenderTask, the onCreate scripts don’t run (the replace operation is not performed).
I’ve been debugging the application line by line and I can’t find why these scripts are not running.
Please, any help will be great.
Regards

Debug query while executing in Preview Mode SSRS

My goal is to view the query that gets executed against the server while in Preview Mode of reporting services.
Is there anyway to do this? Or another approach that I can take to debug the actual query that is being executed by my SSRS report?
I can attach the query text, however I'm more concerned that the parameters are being passed correctly to the query.
I would suggest to install
ExpressProfiler
This is what I used to check that parameters are being passed correctly or not. Try this!

Unable to fetch BasicReport.htm_source.xml in Openscript Test Result folder after execution

I'm trying to create a custom HTML report out of BasicReport.htm_source.xml in the Test Result folder.
I'm not able to access the xml file during script execution. Eventhough I used the XML rendering function in the finish() node.
Is their anyway I can use the BasicReport.htm_source.xml after script execution?
finish section is still execution, in short no way to do this.
if an Oracle customer, use official channel to create ER

Extracting Test outcomes serenity BDD

Went through the serenity documented for extracting the test outcomes
below isthe code, it didn't work
OutcomeFormat format = OutcomeFormat.XML; TestOutcomes outcomes =
TestOutcomeLoader.loadTestOutcomes().inFormat(format)
Tried with below code and its working,
OutcomeFormat format = OutcomeFormat.JSON; TestOutcomeLoaderBuilder
outcomes= TestOutcomeLoader.loadTestOutcomes().inFormat(format);
TestOutcomes out =outcomes.from(new File(""));
Issue is i need the test outcomes in #AfterScenario, but the thing is serenity reports gets generated after the entire execution tried changing the pom but didn't help. Is there any other way using which we can extract the test results?
Serenity uses JSON format by default now. Why are you trying to obtain the test outcomes? (i.e. what problem are you trying to solve?)
Created a separate java class for report extracting and added that in maven plugin which will get executed after serenity report is generated.
As #John smart has mentioned JSON and HTML are default output formats.
Still if you want to access Outcomes after test execution.
You can create a custom listener and listen to serenity event bus.
TestRunFinished event will be published with Outcome as a parameter.
You can use the outcome for getting required details.
For creating custom listener you can follow this page

Resources