I have a word document currently used in a mail merge. My product owner wants it setup to use SSRS so we can take advantage of internally generated data in addition to the stock data our vendor's platform provides. The platform integrates with SSRS so options that are not SSRS are not available to me. I found this question but it's been inactive for 9 years and didn't get a lot of traffic and the linked blog post appears to be gone.
Using a Word document as a template for an SSRS report?
Is there any way to use the word doc as a template, or some kind of starting point in SSRS?
Unfortunately this is not possible without a lot of work. I had the same issue several years ago and ended up writing an application in C# to do all the work. This was not something that we could achieve in a few days.
Just in case you considered going that route, here are some of the issues you might face and what we did to get round them.
Font/Styles: We wanted to apply certain styles to sections such as the contents page, numeric tables, blocks of text. Within the SSRS report was an option to 'use tags' (via a report parameter). This allowed us to add tags that could be used to search/replace or style anything within them. The app would look for these tags style according to the template
Nested tables: Our reports were mainly tables of data interspersed with blocks of text. SSRS tries to gets things to physically align with what you see on screen so it tends to put everything in tables. This causes problems when you want to find blocks of text etc (as above) so I had to write a routine that would look for the innermost table and extract that. Sometimes this would select the wrong table such as if column are merged, SSRS will create yet another table to contain just that one piece of text so I had to add tags to the report to tell the app what to expect. All very messy.
The basic principle was to get SSRS to dump out a word file then our app would read thru it and extract the content, pasting it into a new document which was based on our Word Template.
If I had to repeat the process avoid doing what I did and I would concentrate on getting SSRS to output exactly what was required, matching the template design but this is only good if you don't have things like form fields etc as SSRS cannot produce these.
Word Automation is another option but that is slow or maybe look at some of the Apose renderers and see if they are of any use. ( https://www.aspose.com/ )
Sorry its not the answer you wanted but hopefully it will save you some time trying to figure it out.
Related
I'm trying to generate some reports on ms-access, at the beginning I thought my problem came from the size of my images but in fact that's not true. I'm generating some reports with different informations, different images, there is more or less pages depending on the report. And I encountered some issues with the reports with a lot of pages, at the beginning everything is correctly generated, but very quickly I saw missing informations, missing images until there are only blank pages. Maybe a processor issue during the creation of the pages, there is a way to fix that ?
Thanks in advance for your answer.
Example of what I want
Here is an example of my report, the white square represent my image, and the blue squares represents my informations about my product.
And in the following example, I have generated my report and at the beginning everything is fine (Page 1), after I've only the image of my product (Pages 2,3) until I got nothing (Page 4). In this example there is 88 pages in reality, I show you the part were there is a problem.
Example with what I have
For my DB, she was created a long time ago with visual fox pro and for my query it's between 4 tables and the query returns more of 60 fields. I can't show you this, because this Access file was created by another user and I can't modify a lot of things, I can't have the request in SQL language, it's blocked.
And the last part, my images are stored in a local server, we're placing them in the report by looking the reference of the product.
I hope that this informations will be useful to answer me.
I've been using Dax to help me Document my Power BI file. Using Dax queries I've been able to record all the fields that exist in the file, including calculated and measured fields. In my documentation process I am also looking to find a way to record visualizations on the report - namely the charts and graphs. Unfortunately, no Dax query I've read about provides a list of data such as the visualization title, what fields it's using, or what kind of graph it is. Is there any Dax query that provides this information, as a whole or any part of it?
In addition to attempting to document with Dax I have also looked at the raw XML data in the Power BI file (For those who may not know, you can rename your Power BI file from .pbix to .zip and view the raw data). The relevant files within PBI are either XML or JSON. Looking at ../Report/Layout.JSON specifically I have seen JSON-formatted text that includes visualization data. Is there any easy way to extract this data and format it in a more-readable fashion?
For clarity, I do not need the contents of the tables, but I would like a way to record what fields are being used in the visualization, rather than what fields merely exist.
EDIT: I've found a workaround. It isn't efficient, and I would still appreciate any knowledge on this subject
I mentioned going through the the Layout file, renaming it to .JSON and poking it in Notepad++. I've found that you can ctrl+f for "displayName", "queryRef" and ""title\":show\":true,\"text\":\"". Break these all to new lines and indent them with tab (Use ctrl+h and replace with \n\t in notepad). These indent the JSON-formatted lines for Power BI pages, fields called by visualizations, and the visualization titles (if they have any), respectively.
Save this document as .csv and load it into Excel by delimiting on tabs. Use your preferred process - I prefer query editor - editor to remove the other non-indented rows. There still may be a lot of excess characters on the indented lines which need to be removed manually. At the end of this process, though, I ended with 3 columns in excel listing the aforementioned fields I've been looking for.
On a PBIX file with more than a dozen pages and several hundred dependent fields this process took about three hours. If there are any faster ways to do this, I would love to hear about them
As you have noted, DAX doesn't help you in this case because it will tell you about the model rather than the visuals on the report pages. The Layout file works, but you have to parse it for the information you need. You could probably just pull that JSON file into Power BI and process it there to get the info you want. There are also third party tools that can help with this. I just looked at https://app.datavizioner.com/ and it lists the ID of the visual, the type of visual, and each field used in the visual. It is currently free and just requires you to upload a PBIT of your report. It doesn't have the title of the visual that we see, so you would have to find a way to map the IDs you see to the human-friendly title of the visuals if you need that.
See http://radacad.com/power-bi-helper. It can tell you tables and columns in use. It also can export a list of all tables, columns, formulas, and roles in your model.
If you want stuff on the visualizations and how they are configured, Layout.json is the only way I know. The file does open nicely in Power Query if you were so inclined to try to make something of it.
My new Power BI comparer tool documents the whole Power BI file (pbit). The "CompareVisuals"-tab should provide you with all the information necessary.
It also superfast: Just fill in the path to the pbits (you can fill in the same path into both fields, if you don't want to compare, but just to analyze one file).
https://www.thebiccountant.com/2019/09/14/compare-power-bi-files-with-power-bi-comparer-tool/
I'm trying to write a Macro that retrieves data on all HTTP Post forms from a webpage, and then displays the possible inputs as column headings in a worksheet. (Later I'll write another macro that constructs the appropriate requests based on input from the rows below.)
I've spent a day trying to parse the HTML with regex, (classic rookie mistake, right?), and it's a disaster. Nothing seems to work for more than a couple of webpages.
My question is sort of a big picture one. Should it be able to work with REGEX? Should I be taking an entirely different approach? Is this too big a task for someone who doesn't know a whole lot about html, and web development more broadly? I thought it would be a simple project, but it just doesn't seem to be.
don't use regex. use an html parser. Since you said you're using vba, I'll make a guess that you have excel installed. excel has a "import data from web" function that works on any well formed html table.
and if that doesn't work, most platforms that have vba also have a web browser control of some kind. load your target web page in an instance of said control, and access the table you want with the DOM's methods.
I have a huge MS Word file I use for personal notes but I want it to be more flexible. The file is made from short articles (600 words) with date, title, sometimes a table or some images. I came up with the idea of separating the single articles an put them in Access, to extract them from the database with queries, add tags, sort chronologically.
One big question is: which format should I use? I tried Access 2010 Rich Text Edit but it doesn't show tables, and I don't know where to store images. My idea is to store images outside the file.
Another thing I tried is to store the files as HTML in the database directory, but when I try to add some interface functionality I encounter problems with the most trivial things, like making VBA open the associated file. I don't like storing outside Access also because I don't have full-text search.
The primary requisite for this application is that it must not be cumbersome: it's a prototype I want to use to see if my model of storing notes works, so I don't want to spend a month programming an user interface, and if I note any defect at runtime I must be able to switch to design mode and fix it in minutes. If I want to write something, i don't have to worry about HTML syntax but I want to be able to add some simple table or image.
What I finally search is a HTML viewer in Access interface that receives an HTML string (composed by a query) and displays it.
At this moment I'm considering to remain with my MS Word file because switching seems too complex, although I don't like the sequentiality of articles and the hierarchy of chapters/subchapters, which made me think about this Idea.
The answer to all those problems was Evernote, which is like a Wiki you can edit quickly also from a smartphone, with or without an internet connection, which syncs to a master version on an Evernote server and without the constraint of having to invent a title for every page/idea.
If I had a huge Word document like yours, I'd probably split it into individual files and use something like dtSearch.
Our customers have asked for Sharepoint and, of course, we are having to implement features for which Sharepoint wasn't really designed. We are first trying to stretch the in-house webparts as far as we can, so we are doing a lot of the work in stored procedures, user defined functions, and custom views in the MSSQL DB.
I am generating html links from fields in the database and wish to display them in something like a Data View web part. Of course, all of the data being displayed is being filtered so that it shows up as unrendered HTML. Is there a way around this?
Alternatively, is there any type of web part that can connect to another webpart or Data source and display unfiltered text/html from that source?
You need to use the XSLT in the dataview webpart to control the rendering.
You have full control over what html is created. disable-output-escaping if necessary.
I get a feeling you’re customizing SharePoint the wrong way. Either that your I don’t really understand the description of your question. I would appreciate a more detailed description of exactly what you are trying to accomplish.
As far as I know you should NEVER touch the SharePoint database directly. I think you should focus on creating lists, field types, WebParts and whatever SharePoint components you might need; instead of messing around in the content database.
SharePoint got a decent development API. It takes some time to learn, but in the end it’s probably worth it.
You can connect your custom made WebParts in SharePoint, here is a sample.