in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

draw custom graphic on xtrareport???

Last post 11/13/2008 3:13 AM by George (Developer Express). 7 replies.
Page 1 of 1 (8 items)
Sort Posts:
Previous Next
  • 11/6/2008 5:44 AM

    draw custom graphic on xtrareport???

    Is it possible to draw custom graphic on xtrareport?

    suppose that we create an ellipse using window form :

    - we could use window form as canvas to draw the ellips shape that will manipulate some Graphics functions (drawEllips, drawLine, etc...)

     

    When I try to search how to draw custom graphic on xtrareport using aspx.NET, i found that they already have GdiGraphic Class, but how to implement it??? I'm really wondering how to draw it in devexpress xtrareport control.

    I prefer to draw it directly to a canvas (xtrareport control class, or maybe need another control like XRControl), since the image conversion will make the drawn graphic got lower quality.

    please help Confused, many thanks.

     

    -wachid-

    Filed under:
  • 11/6/2008 7:11 PM In reply to

    Re: draw custom graphic on xtrareport???

  • 11/7/2008 11:27 PM In reply to

    Re: draw custom graphic on xtrareport???

    Thanks for your reply.. but, is there any possible way to draw any graphic on Web Application using xtrareport (ASPX.NET) ???

     

    Any suggestion?

    best regard,

    -wachid-

    Filed under:
  • 11/10/2008 3:46 AM In reply to

    Re: draw custom graphic on xtrareport???

    Wachid,

    Sorry, it's still difficult for me to understand what your exact task is, as there are too many specifics-dependant nuances, which one should keep in mind dealing with custom graphics.

    Actually, there is no difference in case of an ASP.NET application, as a report should be generated anyway, and then loaded into the ReportViewer and exported to HTML.

    Note that watermarks are not exported to HTML. So, it appears that using them is not appropriate for your task.

    In some scenarios, the creation of custom controls may help. Or, you can try to use PrintingSystem brick graphics (using the XtraReport.PrintingSystem property), but this is a very non-trivial task.

    And finally, I believe that the best way for you to solve your particular task is to write directly to our Support Team at http://www.devexpress.com/sc. Please describe your requirements to them as thoroughly as possible, and, probably, providing them with your  solution (if any) will make sense, too.

    Hope this helps you and good luck!

    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 11/12/2008 9:19 AM In reply to

    Re: draw custom graphic on xtrareport???

    Hi George,

    I'm sorry for being not detail about my problems... Actually, I've been try to draw a custom graphic (eg: drawing a line that using trigonometri formula that will generate a wave line of sinus formula) through draw event (base on XRPictureBox Control), it's been a while to tested it, but finally I could find it that it's worked perfect...

     

    private void xrPictureBox1_Draw(object sender, DrawEventArgs e)
        {
            IGraphics oGraphic = e.UniGraphics;
            oGraphic.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
           
            for (int i = 0; i < 300; i += 10)
            {
                for (float x = 0; x < xWidth; x+=0.1f)
                {
                    y = /* Sinus formula to calculate the Y value */;
                    oGraphic.DrawLine( /*draw line parameters */ );
                }
            }
        }

     

    But, it has been drawn the wave line on the top layer of the report... Is it possible to draw the wave line first (I think, it should be like a background) and then draw the detail text for the report???

    Many thanks for your help.

    -wachid-

    Filed under:
  • 11/12/2008 10:14 AM In reply to

    Re: draw custom graphic on xtrareport???

    Wachid,

    The code you've posted here isn't suitable for an ASP.NET application. Probably, this image can be displayed in the preview, but it won't be shown in the final application. The only solution I can offer you at the moment is to create an image and then assign it to the xrPictureBox control's Image property.

    Furthermore, as I've already mentioned, it will be impossible to use the image as a background in ASP.NET. So, you can display it at the top of your report, before the Detail band (by placing it within the ReportHeader or GroupHeader band), but not behind a report's content.

    Hope this helps you!

    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 11/12/2008 10:39 AM In reply to

    Re: draw custom graphic on xtrareport???

    Thanks for your quick reply...

    Actually it's really work when I'll print the report... on the print preview, I could get the wave line was drawn and it's really worked when I print it on the paper...

    I'm really wondering about how the watermark image could do an inserting method to the lowest layer (be a background for the report) before we print the file...

     

    Any suggestion? Thanks George...

    Filed under:
  • 11/13/2008 3:13 AM In reply to

    Re: draw custom graphic on xtrareport???

    Wachid,

    Again, there is a difference between WinForms and ASP.NET application. For the former, watermarks are supported, for the latter - not. So, in ASP.NET app, watermarks won't be seen, but when a web-report is printed, they will appear on the page.

    To make a watermark printed behind a page content, use the PageWatermark.ShowBehind property.

    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
Page 1 of 1 (8 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED