I have Data Driven subscriptions which run # 8 AM on reports and it creates PDFs based on CustomerID.
Below are the few PDF filenames : (Each file has the customer ID appended to the filename, In this case, 12345 and 45678 are the customer IDs for both files)
SampleReport_11_12345
HighlightedReport_9_45678
So, The next day if the same Customer ID (12345 and 45678) report is generated, the file names are being changed like
SampleReport_11_12346
HighlightedReport_9_45679
Next day I want to change the file names as
SampleReport_11_12345_1
HighlightedReport_9_45678_1
It's adding a number to CustomerID, Do you know how to resolve this? Thanks for the help!
Related
I have scheduled to unload data from snowflake to S3 every hour . Data gets uploaded to this path : My_bucket/year=2021/month= /day= /hour = /data.csv
year , month , day and hour gets dynamically updated in the path at every hour run .
Data need not necessarily be there every hour. At that time No folder or path is getting created
I need to have folder for every hour in S3 irrespective of data flowing in .
like hour=1 ,hour=2 ,hour=3 and so on for all 24 hours every time the query runs.
There should be csv file if data is present in table and even if the data is not present path for that hour should be there with empty file
So how should I modify my sql query?
Hi You achieve this by using one workaround.
Since snowflake will not upload any file if the query return zero rows.
This workaround will copy empty-file with headers only if no data is available.
copy into <s3_path>
from (
-- this will act as header for both condition if data present or not.
select 'customer_id','store_id','metro_id','message_type'
UNION
select to_char(customer_id),to_char(store_id),to_charmetro_id(),message_type
from myTable
)
OVERRIDE=TRUE
FILE_FORMAT=(type=csv)
I need to create multiple reports at once taking into consideration the date column.
For example:
INVOICE COMMENT DATE
------------------------------------
1111 example1 14/04/2018
2222 example2 14/04/2018
3333 example3 15/04/2018
4444 example4 18/04/2018
For day 14/04/2018 I would need to generate two PDF with this data:
1111-example1-14/04/2018
2222-example2-14/04/2018
So basically one for each row with today's date. On 15/04/2018 only one report would be created.
I need SSRS "to loop" between dates and creating a PDF file for each one. Obviously the query would be larger, but this is just and example.
Is this even possible with SSRS or maybe there are other ways to do it?
You can do this with a data-driven subscription. You would need to write a small query that returns all the parameter values you want to use. When it runs, it will create a copy of the report for each value you specify. You can have the resulting PDF emailed or stored in a directory.
I have a written an invoice report that bundles up various charges to customers during a month. I have a filter set to a Parameter for a customer code that I am using for testing purposes. The final product, however, I would like to be able to specify a date and have a separate invoice (ideally it's own PDF) generated for each customer. Is this achievable in SSRS?
Notes: Invoice number is a generated field that is a combo of MM-YYYY-CustCode so we don't need a register or some sort of incrementing facility for the invoice number.
Emailing the resulting PDFs to one email address is acceptable so we don't need the system to pull a unique address for each customer.
The selection string from the SQL is as follows (not sure its needed but just in case)
CAST(VP_BSL_OWnerTrn.accountingdate AS DATE) = #accountingdate
AND (VP_BSL_OWnerTrn.code = 'Rental Com'
OR VP_BSL_OWnerTrn.code = 'Mgmt Fee'
OR VP_BSL_OWnerTrn.code = 'Gifts/Amen'
OR VP_BSL_OWnerTrn.code = 'Handling')
AND VP_BSL_OWnerTrn.Price_Local <> 0
AND VP_BSL_OWnerTrn.RoomNo = #RoomNo
Thanks in advance for any help/advice.
I have a custom object in Salesforce called File_Uploaded__c:
When I upload a file in my web application (Symfony2),
I save its information(size, name,...) in Salesforce,
but the file in question is registered in a server.
And when I delete the file from salesforce, I need to delete it from the server after 10 days to gain space in the server but I don't know how to get the deletion date.
I tried to add a filed of type Formula in File_Uploaded__c where I compare the current date with the last modified date and if it's more than 10 days I return true but it doesn't seem to work because last modified date could be update date and not only deletion date.
Mark object in SF as deleted. It will be there for 10 days. After you delete file from server, delete object from SF.
Direct answer on your question:
[Select Id from File_Uploaded__c isDeleted = true ALL ROWS]
Magento database name convention is not trivial. How to get these fields below for last 7 days?
Last Name
First Name
Address
City
State
Zip
Phone
Email
Amount
Order #
Item #
I could not tell if you were looking for some PHP/Magento code or if you are looking to access the database directly. It might be "better" to create yourself a custom module that fetches this info using the Magento/Zend framework, but since I don't know the code off the top of my head I'll redirect you to the following link which has a very nice SQL query that will pull that info for you (and more).
http://www.magentocommerce.com/wiki/groups/207/fedex_-_shipping_view
You probably just need to add something like this to the end to filter the last 7 days
where so.created_at > NOW() - INTERVAL 7 DAY