Tips for using Dundas for Reporting Services

Source: Internet
Author: User
How can I make the Y axis or 2nd Y axis of the chart show only the maximum and minimum values?
The principle is very simple, that is, to set the interval of the Y axis to the maximum value of this axis, but interval does not support expression expressions to obtain the maximum value of the Y axis, so you need to write code in Dundas to implement it.
In the Dundas property settings window, select Advanced, click ViewCode, and select the postapplydata method from the drop-down list.CodeAs follows:

//Parameter: chartobj-represents the chart object
Chartobj. chartareas [0]. Axisy. Interval=
Chartobj. chartareas [ 0]. Axisy. Maximum-Chartobj. chartareas [0]. Axisy. Minimum;

Click the compile button. After compiled OK is displayed, the Code takes effect. Run report to see the effect.

If series groups is used to customize the color or maker type of each series?
When you use series groups in Dundas, each series added to Dundas will be displayed in groups based on this. The color of the grouped series is defined randomly by Dundas. To modify the color of the series or set its maker, you can also write code in Dundas.
In Dundas, each series has a default name, which is "Series 1" and "series 2. We only need to determine the name of each series separately and then use different settings. In the Dundas property settings window, select Advanced, click the viewcode button, and select the prepaint method from the drop-down list. The sample code of C # is as follows:// Parameter: chartobj-represents the chart object
// Parameter: sender-The chart object that will be painted

If(SenderIsSeries ){

Series = (Series) sender;

Switch (Series. Name ){
Case   " Series 1 " :
Series. Color = color. lightyellow;
Series. markerstyle = Markerstyle. Diamond;
Break ;
Case   " Series 2 " :
Series. Color = color. Red;
Series. markerstyle = Markerstyle. Square;
Break ;
}
}

Click the compile button. After compiled OK is displayed, the Code takes effect. Run report to see the effect.
If the sequence of series appears is not fixed, we can use legendtext to determine the sequence of series. The value of legendtext is the value of the Column Used for group in series groups. We can use switch (Series. legendtext) to determine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.