In Delphi 2009 I install Fast Report 4.8, and create some reports. In my application I use these reports like this:
myfrxReport.ShowReport();
Now some users want to edit the report page, so I use frxDesigner.
But my problem is: "How can I save users changes ?"
Use the report as file, then the user can override that report file in the designer. Next time the report is loaded, the user loads the modified report.
frxReport.LoadFromFile(aFileName); //The report filename with the user changes
frxReport.PrepareReport(true);
frxReport.ShowReport;
Check also the frxDesigner.Restrictions options!
u can this code :
if not FrxReport.LoadFromFile(AFileName) then
FrxReport.DesignReport
else if TAppUtils.Confirm('You Have Authority To Design Report. Do You Want To Design Report ?') then
FrxReport.DesignReport
else
FrxReport.ShowReport(True);
TAppUtils.Confirm : It is method to confirm user to do something or not
Related
I have a Report and in my Detail i put a SubReport with the following properties:
When the SubReport has more than one page, the next page gets blank, like in the images following:
It looks like, this next blank page, is related to the SubReport data, but it doesn't show anything, and after this blank space, the report keep normaly showing the rest of the data.
Anyone knows what can i do to show the data of the subReport when he generates more tha one page?
Try to set TfrxSubreport.PrintOnParent to True
You don't use Fast Report's TfrxSubreport on the Properties screenshot. TppSubReport is not FR's class
My Report.ShowPreparedReport didn't recognize a new addition to my frxDBDataset.
So, I was building 1 report using TfrxDBDataset linked to a TVirtualTable.
Previously only 10 fields stated in Report1.fr3 and it works well.
I do the SaveAs from Report1.fr3 to Report2.fr3 in designer mode
Get back to my Delphi and add 1 new field "tec" in my TVirtualTable
Go back again in ReportDesigner (file Report2.fr3) and see that my new "tec" field is listed in Data tree.
Add the "tec" field to the report.
Preview while on designer and it was normal.
Run the program and call to preview report, it says "field 'tec' cannot be found" or something like that.
Anyone got solution?
Thanks
Please Try.
TVirtualTable.Refresh;
frxDBDataset.FieldAliases.Clear;
When you clear aliases then call Designer
FastReport automatically updates aliases.
That was the perfect solution for me.
I'm managing a Filemaker Pro 12 solution to create purchase orders and send them via email for the iPad but the iOS Platform doesn't allow to export Excel files.
Currently we are sending the orders as a .pdf file but the warehouse has to manually approve each order. The solution we were thinking of is to send a .csv file attached to an email so that the warehouse has less work.
I'm using 3 different tables to create a order. A table that stores the products, a container table (to set the quantity, discount etc.) and a table for the order itself. So you can for example create three product-A and two Product-B in an order which works fine. My PDF solution uses an extra Layout and works fine. On a PC or Mac you can export Excel files with a script and the "Save Records as Excel" function, but this is not available on iOS, so I'm looking for alternatives.
The script I came up with to send the .csv file via email looks like this:
Set Error Capture [On]
Freeze Window
Go to Related Record [Show only related records; From table "Orders_Container"; Using Layout: "MailLayout" (Orders_Container); New Window]
If( Get (LastError) = 0)
Sort Records[ Restore; No dialog]
Set Variable[ $FILE; Value:Get (TemporaryPath ) & "file.csv" ]
Export Records [No dialog; "$FILE"; Windows(ANSI)]
Send Mail[Send via E-mail Client; To: "customer#web.com"; Subject: "Order"; "$FILE"]
End If
Close Windows [Current Window]
I tried to use the function "Export Records" but it exports all records of the current customer instead of the 'Records being browsed' which is only available for the PDF export. I've tried to do this but on iOS you can't create a new file to export and I can't come up with something else. I don't want the users to use Menu -> Export -> E-Mail because they will have to enter 3-4 Email addresses each time which is way to time consuming (this also exports all records instead of the ones which are currently being browsed). Is there any way to export the records that are currently open, save those in a .csv file and send a mail with the file attached? Thanks in advance.
EDIT: Ironically after some testing with different scripts, the script I posted here works now correctly.
The Export Records function exports the current found set - the same as Records Being Browsed. This indicates that other issues are keeping your script from working.
You might want to look at the Related Record and which set is found. Use a temporarily pause just before the Import Records function is called to see what set is present.
Also, keep in mind that if there is an error with your Go to Related Record call, nothing happens. A record created by a previous export would then remain in place and this then might show a different set of records than you would expect.
I am developing the window application using C#. I am using the reportviewer to display rdlc. I just require following things:
1). Print rdlc without viewing it Client will click on print button and print should go System default printer.
2). if System default printer is not available/working then it will prompt for alternative.
i don't want to use xml file
Here is what you need to do is load your report and data into the report viewer and then render the report pages into list of memory streams and print them using then PrintDocument Class here as an expample how it is done link. For the part where it asks the user if it doesn't find default printer change
if (!printDoc.PrinterSettings.IsValid)
{
throw new Exception("Error: cannot find the default printer.");
}
in the Print()method with the showing of PrintDialog for user to select printer.
I'd like to change the default customer invoice print to something else. Add an image to the head, change the layout, change the columns, well everything in fact.
Can someone explain how to start this, or maybe point me to some tutorial or reference about this?
So far all I found was ways to create new reports, but I'd like to change the default invoice print, not create something new.
Default sales invoice report is in AOT>Reports>SalesInvoice. This is not an easy report to modify so it is recomendable to add a new design to it instead of modifying the Standard one. This way you always can revert changes to the standard.
You have more information about AX reporting at:
http://msdn.microsoft.com/en-us/library/bb427701(AX.10).aspx
For Dynamics 2009 some of the basics on report modification are actually in the Microsoft Certification books for DEV I, II, III and IV. There are a couple cook books for AX worth looking into as well. MSDN/PartnerSource is always good.
Another approach is to open the "reports" node in the AOT and locate the "tutorial_" prefixed reports which have been created to demonstrate report modification.
ex:
tutorial_Date
tutorial_Joins
tutorial_HelloWorld
tutorial_Prompt