Custom report in openerp - report

How to remove the default name of the report in the print button without editing in the base class, i.e if I click print button, it display Receipt Slip and "GRN" (my custom report), all I need his to remove the "Receipt Slip" (default report name) from the print option without editing in the base class,
Here is my code,
python file
report_sxw.report_sxw('report.picking.list','stock.picking.in','my_report/report/incoming_shi pment.rml',parser=receipt)
XML file
<report auto = "False"
id="stock.report_stock_picking"
model="stock.picking.in"
name="picking.list"
string="GRN"
rml="my_report/report/incoming_shipment.rml"
usage="default"
/>
How to hide the "receipt slip" (default report name) and replace my custom report name.
And when I select all the record in the list view while printing, "Failed path too long" message, so how can we change the report name GNR.pdf and remove the invoice number from the report

try with this code, it will work
<report id="stock.report_picking_list_in"
model="stock.picking.in"
name="stock.picking.list.in"
string="GRN"
rml="my_report/report/incoming_shipment.rml"
/>

Related

Creating custom metric with GTM

I am new to GTM V2.
I would like to track PDF downloads using custom metric. I can built custom dimension for the same, but am not able to create custom metric.
I want report similar to below:
PDFname no. of download
xyx 1
abc 5
xyz pdf downloaded 1 time abc 5
PDF name and no. of download are column heading , rest are it values
I want to create metric using GTM v2. I don't want to write JavaScript for the same. I have done above report using event tracking, but want to do the same with custom metric
Please explain in detail on how to create custom metric, using GTM.
Please help me on the same as soon as possible.
In the new version of Google Tag Manager, 'Macros' have been renamed to 'Variables' so I will be referring to them as such.
I implemented a tag which tracks when a PDF is downloaded on my website. I did this by creating a custom Variable. Follow the steps to create the variables required to track PDF downloads.
1) Create a new variable called 'element', make this variable an 'auto-event' variable. Select 'Element' from the Variable Type drop-down menu. Click 'Save Variable'
2) Create a new variable called 'Click Link File Name'. Make this variable a Custom Javascript Variable. Insert the following code into the configure variable field.
function() {
var filepath = {{element}}.pathname.split("/");
var filename = filepath.pop();
return filename.indexOf(".")>-1?filename:'n/a';
}
Click 'Save Variable'
3) Create the Trigger - Name the Trigger "PDF Download"
Event : Click
Configure: Just Links
Enable When: [Page URL] [matches RegEx] .*
FireOn: [Click URL Path] [matches RegEx] .(pdf)$
4) Create the Tag
Product : Google Analytics
Tag Type : Universal Analytics
Configure Tag:
Tracking Id : "Your Tracking Code Here"
Track Type : "Event"
Category : "Click"
Action : "Download"
Label : "{{Click Link File Name}}"
Fire On: "PDF Download"
What this set of instructions will do for you is set up variables able to record the name of your PDF file as well as the ability to track it as an event. The trigger that we set up in step 3 tells GTM to ACTIVATE the tag on every page (.*) and FIRE the tag when the user CLICKS a link ending with the string ".pdf". The tag we set up tells GTM to send an event to your GA Account with the category, action and label listed above. The label of the event will contain the name of the PDF file that was downloaded.
If you want any more customization than this let me know and I will provide you with a solution to track things like
- Which page the PDF was downloaded from

Exported image filename customization from devexpress ReportPrintTool

I am using Devexpress XtraReport suite in my application which works fine for dynamic reporting requirement except one customization as below:
User is given report preview using ReportPrintTool with dynamic data.
Now, when user tries to export print preview as Image file with 'ExportMode=Different Files' output file names are generated based on report name(i.e. reportName+pageIndex.png) which i need to define based on some dynamic value or say based on a column value provided to report as data source.
Can anybody please guide me how can I achieve this customization?
Reference from: XtraReport default file name in SaveDialog box
Try to set the XtraReport.ExportOptions.PrintPreview.DefaultFileName option (PrintPreviewOptions.DefaultFileName Property).
PrintControl.PrintingSystem.ExportOptions.PrintPreview.DefaultFileName = "column value that you provide"
To know that how to use it, Follow the below reference links:
default name of report during saving - Here some file name standard related issue also descripbed
How modify predefined file name on exporting report
XtraReports - Custom filename when exporting via the reports toolbar

Print crystal report without using the default print button

I have an application(ASP.NET), in that I am showing different reports using the crystal report viewer.The deafult print dialog is not matching with the template I used in the page.so decided to make a differnt one.The Export option is dynamically working and exporting the report, but for printing,I use the printToPrinter method, which is not showing up the print dialog where I can seleted the printer and the print quality, paper orientation..etc...
Can anyone suggest a method to invoke the print dialog through this method
In order to configure these parameters in your code you can use:
string printerName = ""; //Insert printer name here.
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new ReportDocument();
rpt.PrintOptions.PrinterName = printerName;
rpt.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
And so on... I think that all the rest of your needed configuration are there, available for you to set.

"Missing Parameter Values" error on moving to next page of report

I am writing a web application using ASP.NET 2.0 [Visual Studio 2005 Professional Edition].
I have a Crystal Report that is connected to a stored procedure residing in SQL Server. This stored procedure accepts a parameter and therefore I have a formula in my report's hyperlink section to pass the parameter via Query String.
Everything works fine except when I click the navigation buttons to move to the next page of the report, I either get an error or Crystal Reports shows an input box to enter the parameter values.
The error shown is: "Missing Parameter Values". Only this error is shown and nothing else. If I try to export the report by selecting Export option on the Crystal toolbar, it opens a page and asks for the parameter values.
I am not following why parameter values disappear when either I move from the first page to the other or try to export the report?
Most likely you are setting the parameters in the report viewer instead of the report object. If the parameters are set in the report object they should persist on navigation. If you still have issues create an event handler for the report viewer's 'Navigate' event and reset them.
Aditionally, if you call report.Refresh() or report.VerifyDatabase() after you set parameters it clears the values so be aware of that,
MD
When we click on report navigatin button, print button page is refeshed and we facing with 'missing parameter values error '
My probem is solved by using below line of code.
If Not Page.IsPostBack Then
CrystalReportViewer1.ParameterFieldInfo = paramFields
CrystalReportViewer1.ReportSource = myReportDocument
CrystalReportViewer1.DataBind()
Else
CrystalReportViewer1.ReportSource = myReportDocument
CrystalReportViewer1.DataBind()
End If
where paramFields are runtime created ParmeterFields
Best Regards,
Vinay Shukla

How to Get reports in odt format from rml files in openerp

I have an RML file that generates a report in PDF format, but how can I generate the same report in ODT format?
Under the Administration menu, go to Low Level Objects: Actions: Report Xml. Open the entry for that report, and change the type from pdf to odt.
Just to make this programming related so it doesn't get shuffled off to superuser.com, here's how to configure the report's XML file with this change. Add the type attribute to your report declaration:
<report
id="report_location_overview_all"
type="odt"
model="stock.location"
name="lot.stock.overview_all"
string="Location Content (With children)"
rml="stock/report/lot_overview_all.rml"/>

Resources