Unbound report datasources that get data from a string


06-15-2009, 12:50 PM
I saw that an XML string can be added to a DataSource. I also thought I saw a really simple method a constant dataset value without XML (brackets & queries). This would be very handy for demonstrations.

I would be very interested in string values stored in RDLx that supply data especially without XML.

Is it possible to have an unbound text provider string that does not require brackets and queries?

Can the Dataset be assigned to a XML string via the designer?

The documentation shows that the XML provider can be assigned to a string. Do any demo rdlx files exist using this?


References to demo files would be real nice.

Thanks.

Re: Unbound report datasources that are get data from a string


06-16-2009, 12:17 AM
Hello,
I think that the "Testing data provider" feature is really what you are looking for.
Testing data provider reads the data directly from the command text. You set the column names with the column data types and then list the data. For example(RDL fragment):
    <DataSources>
        <DataSource Name="Nwind">
            <ConnectionProperties>
                <DataProvider>TESTING</
DataProvider>
            </ConnectionProperties>
        </DataSource>
    </DataSources>
    <DataSets>
        <DataSet Name="Nwind">
            <Fields>
                <Field Name="Name">
                    <DataField>Name</DataField>
                </Field>
                <Field Name="Email">
                    <DataField>Email</DataField>
                </Field>
            </Fields>
            <Query>
                <CommandText>Name(String),
Email(String)
Don,don@hotmail.com
Chris,chris@yahoo.com</
CommandText>
                <DataSourceName>Nwind</
DataSourceName>
            </Query>
        </DataSet>
    </DataSets>
I have attached the example of the report which uses Testing Data Provider. Let me know whether you have any questions.


Sergey Abakumoff
GrapeCity

Re: Unbound datasources that get data from an embedded RDLx string


06-17-2009, 2:16 PM
Thanks. This is VERY helpful.

I am still wondering if a Ado.net dataset 'persistence' string may be embedded into a report. This stores more datatypes and has UI support (TESTING is not exposed). It is also the native provider that is used by my users.

Also I have not found a demo RDLx file of the embedded XML provider string.

Re: Unbound datasources that get data from an embedded RDLx string


06-17-2009, 10:02 PM
Hello,
I will try to answer the questions in the order they are presented.

Sergey Abakumoff
GrapeCity

Re: Unbound datasources that get data from an embedded RDLx string


06-17-2009, 10:23 PM
Sorry, the correct link for build 1.6.1318.0 is https://grapecity.sharefile.com/d-s8a02c15276648c3b

Sergey Abakumoff
GrapeCity

Re: Unbound datasources that get data from an embedded RDLx string


06-18-2009, 1:13 PM
Great response!

BTW: The newest file ink displays an empty download list.

Thank you for this information. This thread has a wealth of information about embedding data in RDLX.
I probably forgot about the root node in my embedded xml. The demo file with embedded xml is very useful and saved me time fiddling around with the example in help.

I understand that custom providers can be created and are very similar to the ado.net providers but my current requirement requires that the data not be controlled by the user. I add the datasets when creating reports and running the reports.

Ado.net can have columns of any type although I understand that this is not useful unless the client can utilize them. ADO.net does do a nice job of storing the byte array used by the Image Report Item. I do not know how easy storing this information in the CSV or TESTING providers could be (or even XML) or even if they support this.

Re: Unbound datasources that get data from an embedded RDLx string


06-22-2009, 2:15 PM
Hello,

Please provide some more information on what exactly are you looking for.Please provide your requirement in detail so that we can assist you better.

Regards,
Sandeep

Re: Unbound datasources that get data from an embedded RDLx string


06-25-2009, 8:49 AM
This thread has been very informative. I have one last question involving Image data.

Is Base64 encoding (frombase64) supported for any of the file or text based providers such as xml, dataset (file) and the csv/testing providers?

I am interested in using static documents (preferrably an embedded string in the RDL but a flat file would also work) with the Image report item.

Re: Unbound datasources that get data from an embedded RDLx string


06-25-2009, 11:42 AM
Any data provider can keep base64-encoded strings. You just need to convert the value from base64 to byte[] before sending the data to the Image Report Item. This can be achieved by using the custom code and the expression in the Value property of the Image Report Item, for example:
=Code.GetImage(Fields!Image.Value) where:
"Image" is the name of the field that keeps the base64-encoded string value.
"GetImage" the method of the custom code which gets the base64-encoded value and returns byte[] value.

If you need the example of that approach, please, let me know.

Sergey Abakumoff
GrapeCity