I have a report that is going to be saved as .doc or .pdf, my boss wants the name of this file to be saved as the parameters name [it could contain multiple values], but he chooses the file format.
how can I get this done in reporting services?
thx!
You can't from Report Manager whihc is where I suspect you mean
You'd have to wrap a call to ReportServer using SOAP, passing in parameters externally, and renaming in your wrapper. The wrapper would be ASP.NET or WinForms or such.
Alternatively, you may be able to have a custom renderer.
Edit: what your boss asks isn't always possible, even for your boss...
override or handle render method and customize the file name based on parameters provided
Related
Does anyone know of a PDF printer driver that allows you to programatically set the file name for printing/saving.
Im not sure if its possible with PDFCreator, but Im unable to figure it out.
So I am creating HTML Reports and have a print button to print it to PDF.
But now I have to automate it more so that it will be able to generate the PDF with a certain name. This without human interaction.
Win2PDF has several ways to do this.
The Auto-name feature can automatically name the PDF file, and can use the document title to name the files along with configurable date/time stamps. This can be configured with no changes to your program.
The file name can also be set by your program using the Windows API or by setting a string value in the registry named PDFDefaultFileName.
I am working on a project to process data and, depending upon the contents of the data, format it for use by another system. Some of the data provided are not of use to that other system and some of it is so sparsely populated that it would be of no use - is there a way, using Freemarker, to prevent the output of a file at all based upon the contents of the data? I have tried using <#if> statements, but if the checks do not pass, I simply get a blank file output.
This is not up to FreeMarker, but to the software that calls it. FreeMarker doesn't create files, it just writes the output to a Writer. That Writer is provided by the software that calls FreeMarker. So that could implements a logic where the file isn't created until something non-whitespace is written, or could expose a directive to FreeMarker that drops the output file.
I have a package which is creating a excel file 'ExcelName.xls' and storing in 'E:\Reporting\Delivered_Reports'. Now I have to attach this report using send mail task and send it to given mail id. To achieve this I have configured the send mail task and in Expression Builder, I have selected the below expression:
"E:\\Reporting\\Delivered_Reports\\ExcelName_"+
((DT_WSTR,4)Year(#[System::StartTime]))+
RIGHT("0"+((DT_WSTR,2)Month(#[System::StartTime])),2)+
RIGHT("0"+((DT_WSTR,2)Day(#[System::StartTime])),2)+".xls"
I need file name should be 'ExcelName_20150601' where suffix is the current date. But I recieve file which name is 'ExcelName', which is the origional file name. Can you tell me where I am wrong?
Thanks in advance
It sounds like you are editing the name of the excel file in the email, instead of using a file system task to actually rename the file prior to sending it. You can't rename the file using the send mail task, as far as I know.
Additionally, I would do the date to string conversion in a separate variable in order to make this easier to debug, or even put both values in variables to ease maintenance.
Create a variable "var_today" or something and put this code in it:
((DT_WSTR,4)Year(#[System::StartTime]))+
RIGHT("0"+((DT_WSTR,2)Month(#[System::StartTime])),2)+
RIGHT("0"+((DT_WSTR,2)Day(#[System::StartTime])),2)
Then your expression becomes:
"E:\\Reporting\\Delivered_Reports\\ExcelName_"+
#[User::var_date]+".xls"
Do the same for the root directory.
it is better to make the filename you wanted while you are generating from the package.
you cant change the name while sending and put your filename in a string variable instead of writing it directly.
#[User::File_Name]+#[User::date]+".xlsx"
something like this
My workplace has a whole bunch of unannotated .zip files that need to be uploaded to the new file server (Windows). I've used perl to parse through through the excel files within the .zip files to create an annotation.txt file for each .zip file that contains information about the .zip file. I have 1000's of zip files and do not want to manually enter in information for each entry if there's a way to automate it. I am proficient in perl and mysql, and wondering if there is any way to utilize my skillsets to port this information into the Microsoft Sharepoint website.
Thank you in advance for any advice or suggestions.
There a many, many ways to meet your requirement.
You could write a event receiver to parse the files once uploaded and set metadata.
A better approach for your use case might be to write a .NET based console application and reference Microsoft.SharePoint.Client and then upload your files using the Client side object model (CSOM) and set the metadata during that process as outlined here: Upload a document to a SharePoint list from Client Side Object Model
There are also REST and ASMX webservices that you could call from a non .NET runtime process.
Plenty of options, pick the one that fits your needs and skills best.
I have a form that a user uses to upload a CSV file. Right now the user has to type the full file path of the file into a text box. How can I get a browse for file popup to allow the user to navigate to the file instead of having to type the whole path? Is the functionality already present and I just don't know how to use it yet?
you can create your own class with API calls. Here you have the code. Or you can add a reference to Microsoft Office xx Object Library and use the FileDialog class.
Here you have an example of usage.
I prefer the first method, because you are not attached to an external library.