| |
Data Dynamics Reports Support
Started by anjo at 04-07-2009 2:44 AM. Topic has 40 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
04-07-2009, 2:44 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Hi,
We're using ActiveReports .NET atm but are considering to use Data Dynamics Reports instead.. However, we have one issue left to investigate. We have written a custom export filter for activereports that renders report-html to an email-message, with embedded images. Now Im looking to try and do the same for Data Dynamics Reports.. This means that I need to find all images so I can embed them and replace their url:s. Is there any easy way to accomplish this? Like IOutputHtml in ActiveReports .NET?
|
|
|
|
|
Report
|
|
|
|
04-07-2009, 1:35 PM
|
Scott
Joined on 08-28-2004
Columbus, Ohio
Posts 492

|
|
|
You can use the HTML Rendering Extension in Data Dynamics Reports to save the output as an .mht file which is actually a MIME encoded file (which is exactly how HTML emails are encoded). You might consider grabbing that .mht output from the rendering extension and trying to use it as the content/body of the email. For more information see the following link (note the MhtOutput option): http://www.datadynamics.com/Help/ddReports/ddrconHTML.html
However, there is something very similar to IOutputHtml in ActiveReports in Data Dynamics Reports. In DDReports it is called a StreamProvider. It is a class you can pass into the Render method of the rendering extensions and the rendering extensions will refer back to the StreamProvider to get the streams that it will write to the report. It is a little on the complicated side, but it is very powerful. If you need a hand with it let us know. For more information about StreamProvider see the following links: Scott Willeke Data Dynamics / GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-08-2009, 6:28 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
I've tried using the mht-output, and did actually succeed in mailing the report, but the result left a little to be desired. The output includes css-classes that doesnt work too well with outlook2007.. Is there any way to make the HTML Rendering Extension put all styles inline? I was hoping that Fragment=True would accomplish this, but it doesnt seem like it.
I took a quick look at StreamProvider and RenderingExtension but didnt get a real "feel" for how it works. Do you have any example code I could take a look at?
Another quick question. Is it possible to disable parts of the webviewer? We're not interested in the built-in mail function and would like to hide it.
|
|
|
|
|
Report
|
|
|
|
04-09-2009, 12:15 AM
|
Scott
Joined on 08-28-2004
Columbus, Ohio
Posts 492

|
|
|
I have entered a case on your behalf to have us do some checking into what will work with outlook and make it work "out of the box" for outlook. The case number is 128713. I don't know of way to force the styles to be inline, but if that is a good solution when they text with Outlook here we should be able to turnaround a good solution for you quickly.
I don't see a way to customize the toolbar. Let me ask around about that and have someone else jump in here if there is a way...
Scott Willeke Data Dynamics / GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-09-2009, 11:13 AM
|
Scott
Joined on 08-28-2004
Columbus, Ohio
Posts 492

|
|
|
One of the DDR team members pointed me to the following forum thread: http://www.datadynamics.com/forums/110871/ShowPost.aspx
This thread actually includes a workaround that enables you to hide or disable the toolbar of the webviewer. Unfortunately, it is a bit of a hack and not an ideal solution, but if it is important for your needs you should be able to use it. Also, we have case 40678 open internally to allow a way to completely customize the toolbar of the webviewer. Since you have reported it again I've asked the PM to consider pushing this one near the top of their priority list. Hopefully he will and well see a new convenient way to customize the toolbar soon!
Scott Willeke Data Dynamics / GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-21-2009, 3:30 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Any progress on the outlook-front?
Also, I'd still like to see some examples of working with StreamProvider and RenderingExtension, if you have any, so I can see about writing my own mail-export filter. I did get the MhtOutput to work but had to extract it and use another component to pack the resulting files into a mail that would be accepted by the mail clients.
|
|
|
|
|
Report
|
|
|
|
04-21-2009, 3:57 AM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 2,780

|
|
|
Hello, I have increased the priority of the email-export change request and I will start working on this tomorrow..Once this feature is implemented and the build to release is prepared you will be notified about that.
See this thread for the example of StreamProvider implementation.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-27-2009, 2:02 AM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 2,780

|
|
|
Hello, I performed some research regarding HTML rendering in Outlook 2007 and found this article. So, they changed the rendering engine from IE to Word 2007...DDR Word Rendering Extension renders the reports to "Word Html" format which ideally suitable for Outlook 2007..At least I tested it a bit and all the elements/styles of a report which is rendered to Word are shown perfectly by Outlook 2007. Could you please test it and let us know whether it works for you? Word Rendering Extension also supports Mht rendering which can be used to keep the images inside the document.. Then..I understand that you would like to send emails that can be read in any e-mail client..I suppose that you send emails programmatically. So, to send email that can be rendered properly in Outlook 2007 and other email clients, you can use alternate views feature of .NET Smtp Client. The main view of the email can be presented in html(HTML RE rendered) format and the alternate view can be presented in Word(Word RE rendered) format.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-28-2009, 5:06 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Hello Sergey,
I tried, but for some reason I can't manage to send the Mht file so that it displays correctly. The only way I have gotten it to work is by unpacking the mht and then repacking it again, but in doing that, all word-specific formatting vanished, so that is no good..
Could you post an example where you send a mail from an mht file programmatically?
|
|
|
|
|
Report
|
|
|
|
04-29-2009, 1:16 AM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 2,780

|
|
|
Hello, I have realized that .NET Smtp API does not support sending emails that are in MHTML format. In this thread they suggested to use html format + linked resources to send html email that includes the images. I have created small sample that renders DDR report that has the image to Word Html format and sends email using .NET smtp client. Some notes about the sample: * The report uses AdwntureWorks database, change the connection string to speciffy the SQL server instance. * I used local smtp server to send emails, change it if needed.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-29-2009, 3:39 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Hello Sergey,
Thank you for the sample. It was really helpful.
There is, however, still problems with the word-output. Our report is multi-page and for some reason only the last page is shown (one of the columns seems to have all the pages stacked on top of each other though). See the attached screenshot. When I set Pagination = "off" the result looks like the report, but only shows the first page. Are there any more settings I need to change?
One more thing: I tried rendering word-output to one alternateview and html to another. That worked well for outlook and thunderbird (outlook chose the one from word, and thunderbird chose html). The only problem here is that there are many email clients that doesnt accept css classes (gmail for instance) so the resulting table is not shown correctly. Do you have any suggestions for making the styles render inline? Im sure there are components available that will remove the css-classes and place the styles inline, but if possible I'd prefer not to hook in more components than necessary.
Let me finish by saying that I really appreciate all your help with this issue
|
|
|
|
|
Report
|
|
|
|
04-29-2009, 11:46 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 2,780

|
|
|
Hello, I have tested the emailing of the multi-page report..To get the correct output in outlook I have set Pagination="off" for WordRE, here is the snippet of the code: WordRenderingExtension renderer = new WordRenderingExtension(); NameValueCollection settings = (renderer as IConfigurable).GetSupportedSettings().GetSettings(); settings["Pagination"] = "off"; MemoryStreamProvider provider = new MemoryStreamProvider(); runtime.Render(renderer, provider, settings);
If it does not work for you, could you please send me RDLX file of the report which causes the problem?
Then, regarding the inline styles..Currently our product does not expose the way that allows to get html-inline-styles output. Actually I would search for open-source-code solution that converts css style to inline one or even implement such a functionality myself. This should not be difficult - searhing of internal css styles and replacing the class names/id's with style attribute would be performed by using regular expressions. However, we will consider adding inline styles feature in HTML Rendering Extension, I just can't give you any estimates when this feature will be released.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
04-30-2009, 4:55 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Hello Sergey,
I did some more tests, and with pagination off it does render everything, but for some reason only part of the document is shown (both in outlook and in word). I've looked at the source and the entire document is there.
I've attached a zip file with the rdlx-file (DdReport.rdlx) and a rendered version (I named it .doc, but it's just the word html)
I also attached another rdlx-file Demo_Invoice.rdlx that also results in a weird output.. It might be a flaw in our report design, but I'd really appreciate if you could take a look.
Due to our company policy I can't include the data but Im sure the effect will be the same no matter what data is displayed
Ok, I will look for a way to convert the styles in an extra step. As you say it should not be difficult.
|
|
|
|
|
Report
|
|
|
|
05-04-2009, 9:20 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 2,780

|
|
|
Hello, Sorry for the delayed reply. Regarding the "partial output" problem - It is MS Word limitation that the page height can not be more than 22 inches. It can be observed by opening email.doc you have sent, then going to Page Setup. You can see that the page height is set to 22", however it is 60" in the document.. This is why we disabled Pagination option for Word RE settings(if you export report from Viewer control).
Regarding the "weird output" problem - it takes some time to simulate the data for the report to get the output, I will return with more details later.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
05-06-2009, 1:36 AM
|
anjo
Joined on 04-07-2009
Posts 21
|
|
|
Hello Sergey,
Ah, then it's back to square one I guess...
Will do a couple of attempts with the ordinary html in outlook to see how it looks with inline styles..
Btw, are there any plans for a html output similar to ActiveReports "Legacy"?
Thank you for the answers
|
|
|
|
|
Report
|
|
|
|
|
|
Page 1 of 3 (41 items)
|
1 2 3 > |
|
|
|
GrapeCity » Product Support » Data Dynamics R... » Export to email
|
|
|
|
|