Change Report Name using xtraReport1.Name

Hi,

Running Ayanova 7.2.0.0.

We have recently upgraded from Aanova 4.0 and I had a piece opf code that changed the name of the report when you printed. The idea is that we can save it onto the network without someone having to type in filenames. Now it does not work !!

I have written a quick test to show teh issue.

Take the workorder number and add _SR to that. Display the string in label1. This demonstrates we are getting the correct data.

Now rename report with same code. report name does not change. Have tried all different things with no luck. Have hunted around the support site with no luck.

private void label2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
label1.Text = (System.Convert.ToString(detailReport.GetCurrentColumnValue(“LT_O_Workorder”)))+ “_SR”;
xtraReport1.Name= (System.Convert.ToString(detailReport.GetCurrentColumnValue(“LT_O_Workorder”)))+ “_SR”;
}

Hello

  1. Was this a report template that was customized by myself for you? Or did you or someone in your company did the original customization and come up with the script?

  2. I would be happy to take a look. To do so, do export the original report template to a file, zip and provide.
    This way we can import the original into an AyaNova 4 environment and see what your actual was doing before, and then see what its doing in an AyaNova 7 environment
    Also include zip of your ayalog.txt file OR provide your exact AyaNova 7 version including hotfix # (i.e. 7.2.0.0 Hotfix 8) and specific network configuration and database server version (i.e. networked via SQL Express 2008 R2)

If you feel any of the information is private, please send via direct email to support@ayanova.com

  • Joyce

AND please also include what the exact text of any error you do get, what the problem is that is now happening.

  • Joyce

Did you resolve?
If so, would be great if you provided for the benefit of all.

If not resolved, do send as requested so I can see what you had, what you doing now, etc as well as what the actual error/issue is - as could just be spelling or identification or where the BeforePrint script is used.

  • Joyce

Hi Joyce,

apologise for delay.

report attached

Ayanova version is : Primary assembly: AyaNova.exe 7.2.0.0 (Hotfix 2)
Ayanova running on :
Operation System Information:
----------------------------
Name = Windows Server 2008 R2
Edition = Datacenter Server
Service Pack = Service Pack 1
Version = 6.1.7601.65536
ProcessorBits = Bit64
OSBits = Bit64
ProgramBits = Bit64

SQL Server is :
DBServer: MSSQL
DBServer version: 11.0.2100.60

No error message comes up. Just does not do what I expected !!

Thanks for the help.

Hello Martin

This report template provided was created with AyaNova 7, and does not appear to be the original report template requested.

Without having the actual original report template that was in use with your AyaNova 4 (the original report template that
was working with AyaNova 4, but now as you say does not work with AyaNova 7) I can’t be sure what was working before and properly troubleshoot from there.

If you would like any further help with this issue, do send the original as requested.

As I wrote with what was needed to help troubleshoot, if you do not want to provide the original report template publically, then send privately via direct email to support@ayanova.com

Or if you would like me to create a customized report template that does specifically what you would like, I would be happy to do so. Provide as outlined in #3 of topic Custom-report-templates and I would be happy to provide a quote.

  • Joyce

Hi,

original report attached.

The specific code is:

private void xrTableCell12_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
xtraReport1.Name=xrTableCell12.Text + “_SR”;
}

The fiel I loaded earlier was essentially a demo of teh issue. Sorry about that.

Martin

Hello Martin

I imported into AyaNova 4 - this report template just now sent does not return any data if used with AyaNova 4.

There appears to be a lot not working with this custom report template, not just the forcing of filename to use workorder number.
If you would like to resolve, we would continue through private correspondence and I can provide quote(s) to resolve different areas. Contact directly via support@ayanova.com with what you are specifically experiencing with this specific report template, and we can go from there.

Specifically in regards to having a report template automatically use a different file name when saving, I have created an example made available in the forum post topic How-to-save-report-file-to-use-workorder-number-instead-of-xtraReport1 that you can refer to.
If you would like further help with this, do contact directly providing as per #3 of topic Custom-report-templates

  • Joyce

Hi Joyce,

thanks for the help. Problem now solved