Completed
Last Updated: 08 Oct 2015 08:20 by ADMIN
sitefinitysteve
Created on: 29 Oct 2014 14:52
Type: Feature Request
1
Allow us to hardcode the "Dataset" for the UI
When I have a coded dataset (in NeedsDataSource) the designer has no concept of the dataset.  I would like to somewhere define the properties that would be available myself so I can use them from the explorer and in the expression editor...instead of having to keep going back to the codebehind to find the property names.
3 comments
ADMIN
Nasko
Posted on: 08 Oct 2015 08:20
Hi Steve,

The behavior to "somewhere define the properties that would be available myself so I can use them from the explorer and in the expression editor" can be achieved with the current version of Telerik Reporting. You need to follow these steps:

1. Create a new CsvDataSource in the report.
2. Write the required data field names as columns in the inline CSV editor (Enter CSV as text) which is offered by the CsvDataSource wizard.
3. Choose the "The CSV has headers" option in the wizard.
4. Set the Report.DataSource to reference the created CsvDataSource component. Now you will have design-time support for the defined data field names in expressions.
5. To ensure that the NeedDataSource event is fired, you will need to set the Report.DataSource property to Null inside the report's constructor: 

this.DataSource = null;

Attached you can find a sample report demonstrating this scenario.
Attached Files:
sitefinitysteve
Posted on: 07 Oct 2015 19:01
Can you please re-open this...  don't think you understand the issue\frustration.

There's nothing for the object DS to point to, the data is created in the report backend.  In this case the frontend is hard to work with because we can't open any dialogs to see the fieldnames to use in expressions or to just simply drag onto the designer.

Just want a way, maybe even an enum or something that it'll look for so the GUI part of the report can see the data fields.
ADMIN
Peter
Posted on: 07 Oct 2015 11:53
Hi Steve, 

For your case our suggestion is to use ObjectDataSource that supports DataSets.