Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:22:25+00:00 2026-06-07T20:22:25+00:00

I want to create my own custom graphic based on some parameterized data and

  • 0

I want to create my own custom graphic based on some parameterized data and have it be generated in a subreport. I placed a ActiveReports.Picture element on the report. I then drew my image in memory using the System.Drawing.Graphics object and then set it to the Image property of the Picture control. This works OK, but the image on the generated PDF is blurry, even after setting the pdfExport1.ImageQuality to highest.

I think it would be better to draw directly on to the ActiveReports Document canvas, but I can’t figure out how to make that work. All the examples out there point you to the same basic example:

http://www.datadynamics.com/Help/ActiveReports6/topic2107.html

The problem is that the example is out of context. I don’t see where this code should run? Inside the sub-report? In the calling report? Outsize the report entirely? When I tried it in the report, the Pages property had no pages (got an index out of bounds error), so I may be doing it in the wrong event.

To be clear, this is not a data-driven report. I get all the data I need via parameters. No DB access is required.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:22:26+00:00Added an answer on June 7, 2026 at 8:22 pm

    In the examples in the documentation you referenced, the DrawLine is drawing on the parent document/report (not the subreport). You can however draw on a page as a section is processed. To do that, you put your rendering code inside of the processing events of the section such as BeforePrint event or AfterPrint event (I would avoid using the Format as there are many caveats when using Format).

    To draw on the page from within a section’s event, you can find the location of the section from the Section class’ CurrentLocation property. For example, to draw a diagonal line across the entire section from the BeforePrint event you could use the following code:

    public void Detail_BeforePrint(object sender, System.EventArgs eArgs)
    {
        this.CurrentPage.BackColor = System.Drawing.Color.Purple;
        this.CurrentPage.ForeColor = System.Drawing.Color.YellowGreen;
        this.CurrentPage.PenStyle = DataDynamics.ActiveReports.Document.PenStyles.Dot;
        this.CurrentPage.PenWidth = 4;
        this.CurrentPage.DrawLine(Detail.CurrentLocation.X, Detail.CurrentLocation.Y, this.PrintWidth, Detail.Height);
    }
    

    This code should work fine within a subreport or a parent report. Apparently you will need to change this.CurrentPage to ParentReport.CurrentPage if you want to draw on the page from within a subreport. If you want to draw relative to the page, you can use similar code but use the PageEnd event. There is a good example in the PageEnd Event’s documentation. However, the PageEvents will only work for the parent report, it may be difficult to orient the drawing coordinates relative to a subreport’s location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create my own custom collection type. I define my collection as:
How do you create your own custom component for vb.net 2008? I want it
I want to create my own custom control that is basically a TableLayoutPanel with
I want to create my own custom annotation (just like the Java style annotation)
i want to create my own custom admin-url in wordpress... how can i do?
I want to create a POD for my own custom command and display the
I want to create 3 different themes for a dialog using a custom (own)
I want to create own filetype to save objects in my app. Basically, I
I want to create my own SeekBar because I can't find anything like with
I want to create my own class named Point, but am running into issues

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.