Include Pre-Formatted content in ACUMATICA Report Writer - acumatica

I have a simple one page report for quoting an opportunity from Acumatica ERP which is working fine.
However, my customer has a standard boilerplate page for terms and conditions. They would like that to be appended to all quotes being generated. But, I don't see a way of adding a pre-formatted page to a report at execution time.
I can do it in code. Create a button that calls the report, and then through .NET code add the conditions page that way. But it seems like this functionality might exist within the report writer itself.
Does it?

In the report footer section, this is the appropriate place to add the boilerplate page. Report footer prints as the last page. You could create a PNG file, in case your boilerplate page has graphics. Then embed the image file into the report footer section.
Be sure to set Page Break property as true

Related

Orchard - access a content type through different URLs so they use different views

I'm trying to create a CSS documentation library in Orchard. I want to save a description, CSS snippet and HTML snippet against each content type. The first view would show the description and CSS and HTML code written out. The second view would show a preview of what the CSS and HTML look like rendered.
cssdocumentation.com/content/item1
cssdocumentation.com/content/item1/live-preview
I've created the content type and the first view. But I'm not sure how to create the second view. I can see if I can create the alternative URL I can use the Url Alternates module to create an overriding .cshtml
To create an alternative URL I've looked at the autoroute module but this only allows you to adapt a single URL (unless I'm missing something?) and I've looked at Alias UI but this forces me to manually create an alternative URL everytime I create a content item.
Is this possible in Orchard without writting too much C#? (I'm a frontend developer so I only dabble in the behind the scenes stuff)
Thanks for any help
Best solution is to do this within your own module. But as a secondary option instead of having a second page, combine this content with your first page and hide it with CSS. When the user clicks a button to navigate to the next step render the CSS/HTML result on the same page. You can do this in many ways, here are a few ideas:
Render the CSS/HTML result out straight away on the same page but hide it. Show it when the user clicks a button
using jQuery to render the result on the client side. More dynamic if you allow editing of the HTML and CSS.
Redirecting the user to the same page with specific url parameters which you can pick up in your alternate to modify the output.

COGNOS generate report in xls format

I have one prompt page, one html report output page and one xls report output page. On prompt page, I have a prompt that selects Output Format(HTML/XLS) and a generate button that generates the report. The generate button needs to display the output page in the correct format.
The 'Generate' button just does promptAction('finish'). The thing is that no matter what i select in the format (XLS,PDF etc),promptAction('finish') always generates the HTML output.
So is there a way to call something like promptAction('finish', varFormat)?
I normally do this the other way around - use native Cognos functionality to run it in the format required (i.e. using run with options). Then use a variable to detect the format that was applied then apply conditional formatting. In your case the would be rendering the XLS page if XLS was selected and render the HTML page if HTML was selected.
I remember having this problem with HTML vs PDF page rendering. I don't have Cognos in front of me but what i found out is that i had to update my conditional style/format because the following would not work right... it was a strange problem but i did come up with a workaround
old pseudo code that wouldnt' work.
Created Variable that says
Case RENDER_TYPE
When PDF
THEN PDF
WHEN HTML
THEN HTML
End
then i put on a conditional style using this variable to make the page visible or not... and this would not work.
what i had to do was this...
Case
When RENDER TYPE = 'HTML'
Then 'HTML'
Else 'PDF' <- or in your case EXL
End
of course its only good for two formats but for some strange reason trying to use any other value than HTML created weird behavior.
Thanks,
If Render Type <> 'HTML' then render PDF otherwise render HTML...
i had problems anytime referring to the render variable with anything other than HTML. So basically i just had to test when HTML then HTML else other format.

Orchard CMS: Is it possible to add BeforeContent, Content, and AfterContent content when editing a content page?

Is it possible when editing a content page to have a text box for Content, BeforeContent, and AfterContent?
I would like to break up my articles into sections such as introduction, core, and summary so that each part gets styled differently in the Layout.cshtml. The only way I can think to do this is to create a layer for each content page then add html widgets for the BeforeContent and AfterContent zones that I would put my introduction and summary in. This seems like alot of extra work.
Sure, add fields and set-up placement for them. Widgets will work too but it will be more painful to maintain. If not almost impossible.

Can I add a button to a CFGRID that lets a user export the grid to an XLSX file? How?

I'm a coldfusion developer working on a reporting application to display information from a CFSTOREDPROC process. I've been able to get the data from my query to display correctly in a CFGRID, and I'm really happy with the display of the data. The grid saves a lot of time because it avoids using the CFOUTPUT tag and formatting the data in HTML for hundreds of reports.
All I would like to do is add a simple Disk Icon somewhere on the datagrid control that would save the contents of the datagrid and export it into an XLSX(2010) file that an end user could then manipulate in a spreadsheet program. This is important because the data needs to have a 'snapshot' at certain times of year saved.
Solutions Tried:
I looked into having a link from the report options page that would fire into a report_xls.cfm page but designing a page that catches all of the report options a second time seems dumb and would add thousands of CFM's to the website.
CFSPREADSHEET seems not to work for a variety of reasons. One is that the server seems to constantly fight me with the 'write' function in this tag. Another is that I don't know how to make the javascript work for this button to get the output that I want.
I also looked into doing this as a Javascript button that would fire based on the data entered. Although the data from a CFSTOREDPROC will display correctly if I use a CFOUTPUT block, CFGRID seems to have a hard time with all output styles except HTML. This has caused some difficulty with these solutions because the application doesn't spit out a neat HTML table but instead sends a javascript page section.
Raymond Camden's blog contains an entry Exporting from CFGRID that we used in our project.
The example in the article exports to PDF, but it is rather simple to modify the download.cfm file to export to Excel files as well:
You modify the file to generate the <table>...</table> HTML from his example in a <cfsavecontent variable="exportList"> tag, so that the #exportList# variable contains the table that will be shown in the spreadsheet.
Next we have a URL parameter mode that determines whether it is exported to PDF or Excel.
So the end of our download.cfm looks like the following:
<cfif url.mode EQ "PDF">
<cfheader name="Content-Disposition" value="inline; filename=report.pdf">
<cfdocument format="pdf" orientation="landscape">
<cfoutput>#exportList#</cfoutput>
</cfdocument>
<cfelse>
<cfcontent type="application/vnd.ms-excel">
<cfheader name="Content-Disposition" value="report.xls">
<cfoutput>#exportList#</cfoutput>
</cfif>

Create a Sharepoint page but don't show in breadcrumb

I'm struggling to do something which I thought should be straight forward, basically I need to create an aspx page which I now realise must be put into a document library but the problem I have is it's only one page and when the page is displayed the breadcrumb has a link to the document library.
We really don't want the users to be able to get to the library via the breadcrumb and just want to show the page. From one of my other questions some other helpful people made some suggestions like putting the file in the _layout directory but this won't work because the new page has a master page associated with it.
Any ideas how I can display the custom page but not allow normal users to navigate to the document list?
Thanks!
Dan
Having a master page associated with an ASPX page does not prevent it from being placed in the _layouts directory. All of my ASPX pages use a custom master page I wrote, and they're all stored in the _layouts directory. But there's enough methods to hide the breadcrumbs without changing the storage location.
If you want to hide the breadcrumbs on only a specific page, the simplest method to do so is to prevent the contents of the breadcrumbs from being displayed. On the default master page (and I'm going assume that your master page also has this), there is a content called "PlaceHolderTitleBreadcrumb", which is what displays the breadcrumb. By overriding this in the ASPX file, you can prevent this from displaying. A simple way is to just insert the following line in your ASPX file:
<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server"> </asp:Content>
By being in the page itself, it becomes a custom version of the breadcrumb instead of the master page's, so it won't evaluate itself and will leave you with a blank line. The will keep content inside the table cell, so it will specifically make a blank line occupy the same space that the breadcrumbs normally would. If you just put an empty content there, then it will instead render nothing there and pull all of your content upwards. Up to you if you think that looks better.
As far as where to place the line, I recommend just beneath the following lines, if your ASPX page has them. If you don't have the following lines, you might have to experiment a bit to find what position works properly.
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
<IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt="">
</asp:Content>

Resources