This is a migrated thread and some comments may be shown as answers.

Line chart preview not showing expecting graph

2 Answers 198 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
Iron
James asked on 09 Apr 2019, 01:47 AM

I am new to Telerik reporting and trying to figure out how to create a line chart to display the data that is attached in the first attachment.  I want the line chart to follow the data in the dataset.  The second screen shot is how I have the report set up and the third screen shot is the designer preview once I complete the report setup.  The fourth screen show is the preview button preview, which is obviously not correct either.  I thought I had an understanding of how to do this but I guess I don't.  Please help me understand how to set this up.

James Wallace

2 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 11 Apr 2019, 03:31 PM
Hi James,

Thank you for considering our product!

From the provided screenshots, I observe that the type of lead_created_on is of type String. I would recommend changing it to DateTime. Overall, you have created the line chart correctly. The important for Start date and End date parameters is to set the Name, Text, Type (DateTime), (default) Value and Visible should be set to True. From the third screenshot, I think that you added the parameters correctly. To be able to filter the table based on the parameters, you need to add 2 Filters to the Category Groups:
1) Mark the Line chart
2) From the Group explorer -> Category Groups -> Click on Filter
3) Add a filter to set the Start date:
Expression: =Fields.Date 
Operator: >= 
Value: =Parameters.ParameterStartDate.Value
4) Add a filter to set the End date:
Expression: =Fields.Date 
Operator: <= 
Value: =Parameters.ParameterEndDate.Value


 For the selection of the client, I would suggest an example which uses the client's name. You might want to change to the client's id. For the client's parameter, additionally, I would recommend setting AvailableValues: DataSource and ValueMember(=Fields.Client). Add one more filter for the client:
Expression: =Fields.Client
Operator: =
Value: =Parameters.ParameterClientName.Value

Please, find attached sample report which demonstrates the proposed approach.

If you use DateTime values on the X axis you may consider using the DateTime Scale for the axis. In this case it will be necessary to add X value to the lineSeries (e.g. = Fields.Date). The difference with the Category Scale is that the latter will display only the dates that are present in the DataSource, and will not scale the dates proportionally along the axis. The DateTime scale will display all the dates between the minimum and maximum in the DataSource and will distribute the ticks on the axis proportionally, in equal time intervals.

Please, let me know if you need any additional help.

Regards,
Neli
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
Iron
answered on 11 Apr 2019, 06:55 PM
Thank you Neli!  It worked like a charm.
Tags
Report Designer (standalone)
Asked by
James
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
James
Top achievements
Rank 1
Iron
Share this question
or