All entries tagged with domino
|
I was looking through an older application I have and came across this technique. I don't claim to have invented it, but I want to pass it along as, after a quick Googling, I couldn't find mention of it. It is both easy to setup and maintain and it works without an agent.
This technique exports a view to Excel via a browser using only three items: the view itself, a Page design element, and a URL.
View Setup 1. Create a new view. 2. in the view properties, click the box for "Treat view contents as HTML" 3. Add the data columns. a. Format the column header text with table header HTML tags, e.g. "<th>Column Head</th>". Since the column heads will be grouped as a row, add "<tr>" to the beginning of the first column header text and "</tr>" to the end of the final column header text. b. Format the column values with HTML tags, e.g., "<td>" + fieldvalue + "<td>. You may want to place the value within an @Text formula, e.g. @Text(fieldvalue), to mitigate data export issues. Since each view entry will be treated as a row, add "<tr>" to
the beginning of the first column value and "</tr>" to the
end of the final column value. By the way, I like to align rows to the top, so use "<tr valign='top'>" at the beginning. 4. Save the view.
Page Setup 1. Create a new page. 2. In the page properties, change the Web Access Content Type to "Other" and enter "application/vnd.ms-excel" (no quotes) in the box. 3. On the page, type "<table>", enter a carriage return, then type "</table>" (again, no quotes). 4. Add an embedded view on the empty line between the table tags. Select the view above as the source. I change the default line value to 1000 to make sure I get everything. 5. You can add a title without needing to know the number of columns by adding "<p><b>Title</b></p>" (no quotes) above the table tag. 6. Save the page with a browser-friendly name (i.e. no spaces or special characters) and a ".xls" extension for Excel. You're ready to go!
URL To open the spreadsheet, call the page with with a standard Domino URL, e.g., "http://www.acme.com/dbpath/dbname.nsf/excelpage.xls".
Caveats * I have not used this with a huge number of either columns or rows, so you may run into some limits if you do. * I wouldn't recommend using this technique if you need to create a lot of spreadsheets, since each view index adds to the database size.
|
Ratings
0
|
We updated recently to 8.5. While reviewing a change I made today to a form on an existing Web-based application, I noticed the two radio button fields were styled incorrectly. No one had touched the fields or the style sheets the app uses, so I was perplexed. My immediate reaction in cases like these is to view the HTML source to see what is being sent to the browser. That's where I noticed a new, Domino-generated label tag enclosing each element of the radio button fields.
It is a minor thing, but it's something I wanted to fix right away. First, I made sure I didn't accidentally check the box to enable enhanced HTML generation. I experimented with turning off pass-thru HTML to see if it made any difference -- it didn't.
After that, I just modified the style sheet to fix the page layout, so that issue is taken are of. Then I did another test and noticed the same thing happens with checkbox fields. So I ask the Yellowverse: Has anyone else noticed this? Is this correct behavior for 8.5? Is there something I can do to turn this off?
Update: How fascinating! This morning, I was reminded to check the 8.5 forum and there was an exact description of my issue plus a response with the reason (accessiblity) and a workaround (creating a CFD field called $$HTMLOptions with the value "FieldChoiceLabel=0" ).
|
Ratings
0
|
A new field in Notes 8 saved me much development time. The issue: The day after Notes 8 was installed on our server, I finished a small intranet database which I'll call "DbX." DbX copied the look and feel from the main intranet database by referencing its style sheet. All was well when I compared the two databases in FireFox, but I saw major font differences in I.E.
The solution: After much searching and verifying that the styles matched everywhere, I finally noticed the cause. In DbX, Domino was generating the usual doctype of HTML 4.01 Transitional for the $$ViewTemplates. In contrast, the main database used WebQueryOpen agents to display views. A doctype of XHTML 1.0 Transitional was hard-coded in the agent. I mentioned this situation to my co-worker, Declan, and he suggested the $$HTMLFrontMatter field. I added the field, entered the XHTML doctype information above and my font issues were gone.
I better get going on my Notes 8 reading.
|
Ratings
0
|
|
I couldn't make it to Lotusphere this year and therefore missed the Jamfest. In that spirit of fun, though, here's . . .
Server Agent Man (sung to the tune of "Secret Agent Man" by Johnny Rivers)
There's a man who writes agents with fervor And all the code he writes runs on the server With every function he calls The agent queue might stall
Odds are you'll be outsourced again tomorrow
(Chorus) Server agent man, server agent man They've given you an ID -- don't save under your name
Beware of simple fixes that you find A simple fix can hide some buggy lines Be careful what you say As you declare the array
Odds are you'll be outsourced again tomorrow
(Chorus)
[guitar solo I'm not good enough to play]
(Chorus)
Archiving the mailboxes every work day Logging document changes triggered by QuerySave You've let a deadline slip While searching the blogs for tips Odds are you'll be outsourced again tomorrow
(Chorus)
Server a-a-a agent man
|
Ratings
0
|