AyaNova service management & work order software
AyaNova Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Upgrade to v4 - Report Issue Expand / Collapse
Author
Message
Posted 2/6/2008 11:22:23 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 9:55:31 AM
Posts: 85, Visits: 108
In my  dispatch work order I have a field that contains the code:

using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.Native;
// ...

string lastID = "";
int pageNumber = 0;

private void OnPrintOnPage(object sender, DevExpress.XtraReports.UI.PrintOnPageEventArgs e) {

   string curID = ((XRLabel)sender).Tag.ToString();
   int pageCount = 0;

   foreach (Page page in xtraReport1.PrintingSystem.document.Pages) {
      BrickEnumerator brickEnum = page.GetEnumerator();

      while (brickEnum.MoveNext()) {
         XRBrick brick = brickEnum.Current as XRBrick;
         if (brick != null && brick.Data.Control == (XRLabel)sender) {
            if (brick.Data.Tag.ToString() == curID)
               pageCount++;
         }
      }
   }

   if (curID == lastID)
      pageNumber++;
   else
      pageNumber = 1;

   lastID = curID;
   ((XRLabel)sender).Text = "Issue: " + pageNumber.ToString() + " of " +
pageCount.ToString();

}

This worked perfectly in version 3.  In version 4 I get the error:

xrlabel16.OnPrintPage, Line 15: error CS0246: The type or namespace name 'XRBrick' could not be found (Are you missing a using directive or an assembly reference?)

Can you please provide some input as to what the problem might be?  Thanks kindly.

Post #3811
Posted 2/6/2008 1:09:27 PM
AyaNova Sales & Support

AyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & Support

Group: Administrators
Last Login: Today @ 10:45:49 AM
Posts: 1,689, Visits: 3,988
Hello

If posting a question about report design, do always provide an attachment of your custom report template, or if you know the same issue occurs with an existing sample report template, to identify that report template by the link to its topic posting so that I can obtain that report template and be able to have it to fully look at so that I can help troubleshoot.

By providing an actual example, than I have something concreate to work with to see what is exactly happening. As my ESP does not work that well, I won't be able to help troubleshoot unless I have an actual report template to refer to.

In this instance, I did a search for xrBrick and came up with the topic http://forum.ayanova.com/Topic3555-103-1.aspx

Please see the new posting for this topic regarding Pages per WO script to use with AyaNova 4

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3814
Posted 2/6/2008 6:05:12 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 9:55:31 AM
Posts: 85, Visits: 108
The solution that you posted in the linked topic did resolve the initial two errors but now the following errors comes up on your modified script:

xrlabel16.OnPrintPage, Line 15: error CS0117: 'DevExpress.XtraPrinting.PrintingSystem'does not contain a definition for 'document'.

Post #3816
Posted 2/6/2008 6:07:20 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 9:55:31 AM
Posts: 85, Visits: 108
I mistyped the one bit ... It should read line 11
Post #3817
Posted 2/6/2008 6:10:24 PM
AyaNova Sales & Support

AyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & Support

Group: Administrators
Last Login: Today @ 10:45:49 AM
Posts: 1,689, Visits: 3,988
Hello

I get no error when I print out that sample AyaNova 4 with Pages per WO report template.

Perhaps you have mis-edited the script in your custom report template. As you did not attach your report template, I won;t be able to provide specific help without it.

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3818
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: AyaNova Sales & Support

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 5:49pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Disabled.