macro prompt not getting refreshed in scheduled report - cognos

I have a date prompt which is set to default to today's date using a prompt macro. The report is scheduled to run daily using today's date but every day it runs it takes the date on which the report was scheduled. My schedule says to run the report and not just view the report.How do I schedule a report to run using refreshed dates? (cognos 10.1)

Javascript does not run for scheduled reports because there is no 'browser' for it to run in. If you have been scheduling your reports and providing a value for your date parameter then that explains it - your macro prompt will not use a default, ti is using a fixed parameter value instead.
Also on the actual prompt page make sure the prompt is not required.

In addition to using prompt macro, you will have to include JavaScript to pre-select the dynamic date values within the date prompt.
This article on developerWorks details the necessary steps, prompt macro and Javascript to set dynamic default values for date prompts.
http://www.ibm.com/developerworks/library/ba-pp-reporting-scripting_techniques-page634/

Related

can some one help me create a Power Automate flow

A power automate flow triggered on a daily schedule will check the list for any tickets that meet (or exceed) due date and submit a ticket to Orion via email. The last run and due date will then be updated. The system may be used to trigger tickets in supplier interface in the future - the destination system should be considered in the list schema.
i am having a hard time to develop a flow that executes the above requirement.
In Power Automate, create a scheduled flow that runs every day.
Declare all variables you will need later.
Assuming you store the value of the last run timestamp in a configuration SharePoint list for example, search and use the action Get item to get the list item where the last run time is stored in this list (you're have to create it if not existing though).
Search and use the function utcNow() in an expression to get the current datetime value.
Convert the previous datetime value with the action Convert time zone to an ISO-8601 datetime using FormatDateTime() function according to your timezone.
Search and use the action Get list items to get all the items of day from your SharePoint list, and filter the query via an OData expression according to the rule (today's date =< last run date + frequency).
Search and use Send an email V2 to send email.
Search and use the action Update item to update the last run time that is stored in a list item in the configuration list mentionned at the beginning.

How to create a report subscription in SSRS which passes today's date to paramters?

I created a report with a StartDate and EndDate parameter. If I want to see the information for a single day, I use the same Date in both parameters. I now want to create a subscription for this report so that it runs everyday. How can I use the current date and pass it to these parameters when the report runs? Thanks!
Step 1: You will have your defaultDates dataset as so. can be query or you can wrap it as a Stored proc.
Select TodaysDate = cast(getdate() as date)
Step 2: then , under default values for both the params you will anchor get value from dataset and point to this dataset, which is defaultDates.
Step 3: test it locally. Make sure to delete .DATA from your working directory to enforce fresh data.
Step 4: build and deploy to whatever test location.
EDIT: This will only work with Enterprise edition.
First, write a query that gets the current date and formats it to match the VALUE in your parameter (for example, is it DD-MM-YYYY, YYYY-MM-DD?). Make sure to name your column something meaningful like "CurrentDate".
select cast(current_timestamp as date) as CurrentDate
Then create a new subscription for your report. Instead of Standard Subscription, choose data driven subscription. Now select your SQL datasource and paste in your query. Press validate to make sure it runs fine. Hit OK.
Now you can go down to your subscription parameters at the very bottom of the page. Set Source of Value to be "Get value from dataset" then pick your "CurrentDate" from the drop down.
That's it, data driven subscription with current date.

How to trigger Javascript in CRM VIew Refreshing?

I create one javascript function For calculate the No.Of Days from created Date and show in one Field.
And I add that script in Form Load and as well Form Save Actions.It was Working Fine.
Now My question is,I need to trigger that javascript function grid's(view) refresh.Or I need to calculate and show the No Of Days Field without opening Form.
Now the noofdays field affected when the form will getting open.
I need noofdays field automatically updated From the Created on date?How to do this...Thanks in Advance
Trigger an javaScript function without opening the from is not possible.
If i understood correctly, you want to display the time period between the creation and current date in days.
If so:
A Solution would be:
On creation of the record the noofdays field will always be 1 or 0. However you look at it.
So you can fill that field on creation per default to 1 per Plugin, JS, or simply per workflow.
Now you need to update this field each day via workflow.
The workflow must retrieve all records, calcualte and update the noofdays field.
I reccomend to run this workflow after midnight.
The other solution: (I do not reccomend)
Create an Plugin which is registerd to the message "retrieve" and "retrieve multiple".
If the message is triggered, check if you are in the right entity and fake the output of the noofdays field or update it.

How to send automatic email notification to user two days before expiry date

In SharePoint 2007 document library I want to send automatic email notification to user two days before expiry date.
After expiry date document will remain in the library.
Any suggestions would really be appreciated.
You just need to create workflow in SharePoint designer. During creation of an item the workflow starts and waits until execution date. If expiry date can be changed you need another action which cancels old workflow (with old date) and starts new one (with need date).
Here you can find instruction how it can be done in SPD
Create a SharePoint Designer (SPD) workflow
Select your task list
Set it to run on Create
Click Next
In the Actions section add these three actions:
- Add time to date
- Pause until date
- Send email
My example looks like this after the properties are set:
Add -7 days to Tasks:Due Date (Output to Variable: ReminderDate)
then Pause until Variable: Reminder Date
then Email this message (you can hard code the address or use the assigned to... )
Notes for this very simple example:
- If someone edits the task and sets a new due date, this workflow will still send the reminder based on the old date.
- It does not check to see if the Due Date is at least two days in the future.
Ref: http://social.msdn.microsoft.com/Forums/en-US/acb12dd2-d6a5-4b7e-b233-037558bfa2e5/start-workflow-x-days-before-expiry-date?forum=sharepointcustomizationlegacy

Optional Prompt in Cognos 8.3

I'm new to Cognos report studio. I have data organized in query items per business date. The Cognos report shows a data filter by business date. For business date there is a separate table join. This is always one column, one row table with current business date. The Cognos report is scheduled to run everyday after data is populated in the data source. This part works just fine.
However, I want to have ability to run this same report on demand and when I run this report on demand it should prompt me for a date instead of picking it from the database table. I know how to add a prompt but when I add a prompt, my scheduled reports doesn't work! I can't provide any default as it has to be dynamically picking it from the table.
Any pointers would be helpful!
Make the date filter (the one derived from the prompt) optional and set a condition on the other filter to be ignored if the prompt has a value.
This is late but could be helpful for other guys. I suggest this:
- In the metadata, make a prompt macro with a default value of current business date
- In the report, make a date prompt using the parameter defined by prompt macro
- In report schedule, leave the date prompt blank to refresh that everyday
This way your schedule runs with refreshed date and also you can pick for a date while manually running a report.

Resources